patch-2.4.22 linux-2.4.22/arch/arm/nwfpe/entry.S
Next file: linux-2.4.22/arch/arm/nwfpe/entry26.S
Previous file: linux-2.4.22/arch/arm/nwfpe/double_cpdo.c
Back to the patch index
Back to the overall index
- Lines: 71
- Date:
2003-08-25 04:44:39.000000000 -0700
- Orig file:
linux-2.4.21/arch/arm/nwfpe/entry.S
- Orig date:
2002-08-02 17:39:42.000000000 -0700
diff -urN linux-2.4.21/arch/arm/nwfpe/entry.S linux-2.4.22/arch/arm/nwfpe/entry.S
@@ -70,39 +70,42 @@
.globl nwfpe_enter
nwfpe_enter:
- mov r4, lr @ save the failure-return addresses
- mov sl, sp @ we access the registers via 'sl'
-
- ldr r5, [sp, #60] @ get contents of PC;
- sub r8, r5, #4
-.Lx2: ldrt r0, [r8] @ get actual instruction into r0
+ mov r4, lr @ save the failure-return addresses
+ ldr ip, [r10, #112] @ get init_flag
+ mov sl, sp @ we access the registers via 'sl'
+
+ ldr r5, [sp, #60] @ get contents of PC;
+ cmp ip, #0
+ bleq nwfpe_init_fpa
+ sub r8, r5, #4
+.Lx1: ldrt r0, [r8] @ get actual instruction into r0
emulate:
- bl EmulateAll @ emulate the instruction
- cmp r0, #0 @ was emulation successful
- moveq pc, r4 @ no, return failure
+ bl EmulateAll @ emulate the instruction
+ cmp r0, #0 @ was emulation successful
+ moveq pc, r4 @ no, return failure
next:
-.Lx1: ldrt r6, [r5], #4 @ get the next instruction and
+.Lx2: ldrt r6, [r5], #4 @ get the next instruction and
@ increment PC
- and r2, r6, #0x0F000000 @ test for FP insns
- teq r2, #0x0C000000
- teqne r2, #0x0D000000
- teqne r2, #0x0E000000
- movne pc, r9 @ return ok if not a fp insn
-
- str r5, [sp, #60] @ update PC copy in regs
-
- mov r0, r6 @ save a copy
- ldr r1, [sp, #64] @ fetch the condition codes
- bl checkCondition @ check the condition
- cmp r0, #0 @ r0 = 0 ==> condition failed
-
- @ if condition code failed to match, next insn
- beq next @ get the next instruction;
-
- mov r0, r6 @ prepare for EmulateAll()
- b emulate @ if r0 != 0, goto EmulateAll
+ and r2, r6, #0x0F000000 @ test for FP insns
+ teq r2, #0x0C000000
+ teqne r2, #0x0D000000
+ teqne r2, #0x0E000000
+ movne pc, r9 @ return ok if not a fp insn
+
+ str r5, [sp, #60] @ update PC copy in regs
+
+ mov r0, r6 @ save a copy
+ ldr r1, [sp, #64] @ fetch the condition codes
+ bl checkCondition @ check the condition
+ cmp r0, #0 @ r0 = 0 ==> condition failed
+
+ @ if condition code failed to match, next insn
+ beq next @ get the next instruction;
+
+ mov r0, r6 @ prepare for EmulateAll()
+ b emulate @ if r0 != 0, goto EmulateAll
@ We need to be prepared for the instructions at .Lx1 and .Lx2
@ to fault. Emit the appropriate exception gunk to fix things up.
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)