This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: Linking libgcc for M68K improperly?



>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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]