Subject: Invalid Assembler Instruction

From: Ralf Rascher <[email-masked]>
Date: Fri, 9 Jun 2000 09:09:59 +0200

Hallo,

I try to compile a Linux Kernel 2_3_99-pre8 with patch-2_3_99-prek8-rmk1
and diff-2_3_99-prek8-rmk1-np5 for an Intel Assabet Board.
I use binutils-2_10-1rc2 and gcc-2_95_2-1nw6 on an i686 Debian Linux PC.
But I get an error when compiling the kernel.

# entry-common.S: Assembler message
# entry-common.S:38: Error: can only set flag field with immediate value

I found out that this is the command:

msr cpsr_c, #I_BIT | MODE_SVC

which is several time in that file. Is that command right, or how can I change
the command, or the assembler (if the command is right) to work?

Thanks,

Ralf

unsubscribe: body of `unsubscribe linux-arm-kernel' to [email-masked]

---

From: Scott Bambrough <[email-masked]>
Date: Fri, 09 Jun 2000 11:23:09 -0400

> msr cpsr_c, #I_BIT | MODE_SVC

The assembler is correct.  You can only use the immediate form with cpsr_f. 
This is a change I recently put in the 2.10 branch of gas, to make the mainline
and the 2.10 assembler behave in a similar manner.  While this form seems to
work, according to the ARM architechure manual the results are unpredictable.

You have to change all the instructions of this type in the kernel code, which
I'm told is quite a chore.

Scott

-- 
Scott Bambrough - Software Engineer
REBEL.COM    http://www.rebel.com
NetWinder    http://www.netwinder.org

---

From: Russell King - ARM Linux Admin <[email-masked]>
Date: Sun, 11 Jun 2000 08:14:35 +0100 (BST)

> the command, or the assembler (if the command is right) to work?

It works correctly on all known (by Linux at least) ARM chips.  However,
it is marked as "undefined" in the ARM architecture reference manual, and
recently binutils has started to implement this as an illegal combination
of operands.

I believe that the last kernel I released last Saturday should have these
all fixed.
   _____
  |_____| ------------------------------------------------- ---+---+-
  |   |        Russell King       [email-masked]      --- ---
  | | | |            http://www.arm.linux.org.uk/            /  /  |
  | +-+-+                                                     --- -+-
  /   |               THE developer of ARM Linux              |+| /|\
 /  | | |                                                     ---  |
    +-+-+ -------------------------------------------------  /\\\  |