CPSR changes to ARM binutils in the mainline...

Nick Clifton nickc@cygnus.com
Fri May 26 10:08:00 GMT 2000


Hi Scott,

: Hi Nick.  I backported the changes you made to to support the new style MSR
: field masks (cpsr_c et al) to the 2.10 branch.  The first thing that happened is
: the Linux kernel will not compile.  It seems the kernel uses `msr CPSR_c, #I_BIT
: | MODE_SVC` all over the place.  The branch accepts this a legal instruction,
: while the mainline generates an error.
: 
: The mainline is correct.  The ARM Architecture Reference states in note 1 that
: the immediate form can only be used to set the flag bits.  The results are
: unpredictable with the other fields, although it seems to work.  However, I
: think your patch should go into the branch for consistency.  I don't think it is
: a good idea for the branch and the mainline to have different behaviour here,
: particularly when we are just about to release.
: 
: What do you think?

Hmm, well I think you are right, the patch ought to go into the
branch.  There are several good reasons:

   * It keeps the branch and mainline in synch.

   * It enforces the standard, as specified by ARM.

   * It will force the ARM Linux kernel to be reocded to avoid relying
     upon unsupported behaviour on the ARM instruction set.  The
     recoding should not be hard, they just have to load the immediate
     value into a register and then use the register in the MSR
     instruction.

So my vote is - "go ahead, commit that patch".

Cheers
	Nick


More information about the Binutils mailing list