--enable-shared doesn't work on Sun-3
Toon Moene
toon@moene.indiv.nluug.nl
Sun Aug 9 08:00:00 GMT 1998
Sorry to follow up on my own mail; I should have thought of this in
the first place.
Kate wrote:
> Here is how egcs fails:
> /usr/tmp/cc6ECDC7.s:2388: Error: operands mismatch --
> statement `jbsr _demangle_template_template_parm,a1'
> ignored
And I replied:
> Yep, this is basically the same problem I ran into back
> in May, when egcs erroneously assumed I wanted to build
> it --enable-shared.
>
> Apparently compiling with -fpic doesn't work on m68k's
> ...
While that's true, it is still interesting to find out what
instruction egcs _wants_ to generate here, because the m68k family
supports more than just: jbsr address.
According to my "M68000 FAMILY PROGRAMMER's REFERENCE MANUAL", the
instruction "Jump to Subroutine" supports the following addressing
modes:
(An) Jump to Subroutine of which the address is in
address register An
d16(An) Jump to Subroutine of which the address is the
sum of a 16 bit value d16 and the contents of An
d8(An,Xm)
The address of the subroutine is the sum of an
8 bit value d8, plus the contents of An, plus
the contents of Am/Dm, whichever X.
xxx.W The address of the subroutine is the value of the
16 bits xxx.
xxx.L The address of the subroutine is the value of the
32 bits xxx.
[ The M680[234]0 have even more "interesting" combinations ]
The second and third alternatives have variants where An is PC
(i.e. the value of the program counter - apparently for supporting
position independent code ;-).
So the question is: What subroutine call addressing is meant by
jbsr _demangle_template_template_parm,a1 and how should it be coded
correctly (as jbsr _demangle_template_template_parm(a1)) ? And does
it make sense, then ? Somebody who knows more about -fpic with a
clue ?
Hope this helps,
Toon.
More information about the Gcc-bugs
mailing list