Subject: Re: cross compile

From: Philip Blundell <[email-masked]>
Date: Wed, 14 May 1997 16:10:00 +0100 (BST)

On Wed, 14 May 1997, David Alan Gilbert wrote:

> The only difference is the question of how to end a procedure, so on an ARM6
> you do:

Yes, I know what the difference is.  I'll rephrase the question.

If I build a binary on an ARM3 machine (using -marm3) and try to run it on
an ARM710, say, which of the following will it do?

 - work correctly
 - silently go wrong
 - refuse to execute

p.

---

From: David Alan Gilbert <[email-masked]>
Date: Wed, 14 May 97 16:05:29 BST

> Is there actually any way to generate a libgcc.a that will work with both
> architectures?  If not we probably ought to try to find some way to do it
> by having two of them and altering the specs file. 

Well that depends what you meen.  libgcc.a actualyl has two copies built
so that lib/gcc-lib/.../m6 contains the one for the ARM6 and .../m2 contains
the one for earlier machines and the OS.

MOV PC,R14 or a plain LDM ...{ ...PC}

on an ARM 2/3

MOVS PC,R14 or LDM ...{...PC}^
which causes the flags to be preserved accross the function.

The same instruction on an ARM6 will cause the SPSR to be restored to the CPSR
which reaks havoc if you happen to call this in the middle of some particularly
mundane kernel code (in this case the bit doing a division to calculate the
time).

Dave