Subject: Re: 1.6.1 compilation problem
To: None <port-vax@netbsd.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: port-vax
Date: 06/15/2003 15:08:29
> Can some gnu as/VAX guru please tell me what the difference between
> ashl $9,*Sysmap[%r0],%r0;
> and
> ashl $9,Sysmap[%r0],%r0;
> is ?
foo[%r0]: PC-relative indexed. This finds the operand at address foo
plus the contents of %r0; the value in %r0 is multiplied by the size of
the access before being used.
*foo[%r0]: PC-relative indirect indexed. This finds a longword at
address foo; to its value it then adds the contents of %r0, multiplied
by the size of the access. The sum is the address of the operand.
"The size of the access", for the second argument to ashl, is 4.
These are actually shorthand for bar(%pc)[%r0] and *bar(%pc)[%r0],
where bar is a value calculated by taking the target address (the value
of the Sysmap symbol, in this case) and subtracting the address of a
particular point within the instruction stream.
> The former is output of gcc compiled kernel source(s) that comes with
> 1.6.1 and cannot be assembled, assembler bails out with already
> mentioned "PIC reference to Sysmap is indirect" error ?
My guess - and it is just a guess - is that the assembler is being run
in a way that tells it to generate PIC code. This involves rewriting
certain references, a rewriting that cannot be done for PC-relative
indirect addressing mode.
/~\ The ASCII der Mouse
\ / Ribbon Campaign
X Against HTML mouse@rodents.montreal.qc.ca
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B