* RE: Linking libgcc for M68K improperly?
@ 2001-02-06 9:03 David Korn
2001-04-01 0:00 ` David Korn
0 siblings, 1 reply; 4+ messages in thread
From: David Korn @ 2001-02-06 9:03 UTC (permalink / raw)
To: 'Holland, Alexander MHX',
'crossgcc@sources.redhat.com'
>Hi,
>I built an image for an M68K-COFF target using GCC 2.95.2 hosted under
>Cygwin. The following libgcc.a functions from my image were obtained using
>objdump. Note line a311c: According to my 68k instruction manual, the bsrl
>instruction results in pc + 0x00000022 -> pc, which by my calculations is
>a313e and not a3140 as it should be. Does anyone have any
>theories/explanations what might be going on?
Yep. The offset in the bsrl instruction is added to the address of the
second word of the instruction, not the first. This goes for all m68k
branch instructions. Try this:
_fred: bra fred
and you'll see the offset is 0xfffe (-2)
hth,
DaveK
--
we are not seats or eyeballs or end users or consumers.
we are human beings - and our reach exceeds your grasp.
deal with it. - cluetrain.org
**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.
www.mimesweeper.com
**********************************************************************
------
Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: Linking libgcc for M68K improperly?
2001-02-06 9:03 Linking libgcc for M68K improperly? David Korn
@ 2001-04-01 0:00 ` David Korn
0 siblings, 0 replies; 4+ messages in thread
From: David Korn @ 2001-04-01 0:00 UTC (permalink / raw)
To: 'Holland, Alexander MHX',
'crossgcc@sources.redhat.com'
>Hi,
>I built an image for an M68K-COFF target using GCC 2.95.2 hosted under
>Cygwin. The following libgcc.a functions from my image were obtained using
>objdump. Note line a311c: According to my 68k instruction manual, the bsrl
>instruction results in pc + 0x00000022 -> pc, which by my calculations is
>a313e and not a3140 as it should be. Does anyone have any
>theories/explanations what might be going on?
Yep. The offset in the bsrl instruction is added to the address of the
second word of the instruction, not the first. This goes for all m68k
branch instructions. Try this:
_fred: bra fred
and you'll see the offset is 0xfffe (-2)
hth,
DaveK
--
we are not seats or eyeballs or end users or consumers.
we are human beings - and our reach exceeds your grasp.
deal with it. - cluetrain.org
**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.
www.mimesweeper.com
**********************************************************************
------
Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* Linking libgcc for M68K improperly?
2001-02-02 18:13 Holland, Alexander MHX
@ 2001-04-01 0:00 ` Holland, Alexander MHX
0 siblings, 0 replies; 4+ messages in thread
From: Holland, Alexander MHX @ 2001-04-01 0:00 UTC (permalink / raw)
To: 'crossgcc@sources.redhat.com'
Hi,
I built an image for an M68K-COFF target using GCC 2.95.2 hosted under
Cygwin. The following libgcc.a functions from my image were obtained using
objdump. Note line a311c: According to my 68k instruction manual, the bsrl
instruction results in pc + 0x00000022 -> pc, which by my calculations is
a313e and not a3140 as it should be. Does anyone have any
theories/explanations what might be going on?
000a3110 <__modsi3>:
a3110: 222f 0008 movel %sp@(8),%d1
a3114: 202f 0004 movel %sp@(4),%d0
a3118: 2f01 movel %d1,%sp@-
a311a: 2f00 movel %d0,%sp@-
a311c: 61ff 0000 0022 bsrl a3140 <__divsi3>
a3122: 508f addql #8,%sp
a3124: 222f 0008 movel %sp@(8),%d1
a3128: 2f01 movel %d1,%sp@-
a312a: 2f00 movel %d0,%sp@-
a312c: 61ff ffff ffbe bsrl a30ec <__mulsi3>
a3132: 508f addql #8,%sp
a3134: 222f 0004 movel %sp@(4),%d1
a3138: 9280 subl %d0,%d1
a313a: 2001 movel %d1,%d0
a313c: 4e75 rts
...
000a3140 <__divsi3>:
a3140: 2f02 movel %d2,%sp@-
a3142: 7401 moveq #1,%d2
a3144: 222f 000c movel %sp@(12),%d1
a3148: 6a04 bpls a314e <L1>
a314a: 4481 negl %d1
a314c: 4402 negb %d2
Thanks,
Alex
------
Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* Linking libgcc for M68K improperly?
@ 2001-02-02 18:13 Holland, Alexander MHX
2001-04-01 0:00 ` Holland, Alexander MHX
0 siblings, 1 reply; 4+ messages in thread
From: Holland, Alexander MHX @ 2001-02-02 18:13 UTC (permalink / raw)
To: 'crossgcc@sources.redhat.com'
Hi,
I built an image for an M68K-COFF target using GCC 2.95.2 hosted under
Cygwin. The following libgcc.a functions from my image were obtained using
objdump. Note line a311c: According to my 68k instruction manual, the bsrl
instruction results in pc + 0x00000022 -> pc, which by my calculations is
a313e and not a3140 as it should be. Does anyone have any
theories/explanations what might be going on?
000a3110 <__modsi3>:
a3110: 222f 0008 movel %sp@(8),%d1
a3114: 202f 0004 movel %sp@(4),%d0
a3118: 2f01 movel %d1,%sp@-
a311a: 2f00 movel %d0,%sp@-
a311c: 61ff 0000 0022 bsrl a3140 <__divsi3>
a3122: 508f addql #8,%sp
a3124: 222f 0008 movel %sp@(8),%d1
a3128: 2f01 movel %d1,%sp@-
a312a: 2f00 movel %d0,%sp@-
a312c: 61ff ffff ffbe bsrl a30ec <__mulsi3>
a3132: 508f addql #8,%sp
a3134: 222f 0004 movel %sp@(4),%d1
a3138: 9280 subl %d0,%d1
a313a: 2001 movel %d1,%d0
a313c: 4e75 rts
...
000a3140 <__divsi3>:
a3140: 2f02 movel %d2,%sp@-
a3142: 7401 moveq #1,%d2
a3144: 222f 000c movel %sp@(12),%d1
a3148: 6a04 bpls a314e <L1>
a314a: 4481 negl %d1
a314c: 4402 negb %d2
Thanks,
Alex
------
Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2001-04-01 0:00 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-02-06 9:03 Linking libgcc for M68K improperly? David Korn
2001-04-01 0:00 ` David Korn
-- strict thread matches above, loose matches on Subject: below --
2001-02-02 18:13 Holland, Alexander MHX
2001-04-01 0:00 ` Holland, Alexander MHX
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).