patch-2.4.4 linux/arch/arm/nwfpe/entry.S

Next file: linux/arch/arm/nwfpe/entry26.S
Previous file: linux/arch/arm/nwfpe/double_cpdo.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.3/linux/arch/arm/nwfpe/entry.S linux/arch/arm/nwfpe/entry.S
@@ -1,7 +1,7 @@
 /*
     NetWinder Floating Point Emulator
-    (c) Corel Computer Corporation, 1998
-    (c) Philip Blundell 1998-1999
+    (c) Rebel.COM, 1998
+    (c) 1998, 1999 Philip Blundell
 
     Direct questions, comments to Scott Bambrough <scottb@netwinder.org>
 
@@ -86,7 +86,7 @@
 
         ldr r5, [r4, #60]	 	@ get contents of PC;
 	sub r8, r5, #4
-.Lx2:	ldrt r0, [r8], #0		@ get actual instruction into r0
+.Lx2:	ldrt r0, [r8]			@ get actual instruction into r0
 emulate:
 	bl EmulateAll			@ emulate the instruction
    	cmp r0, #0			@ was emulation successful
@@ -115,15 +115,17 @@
         mov r0, r6			@ prepare for EmulateAll()
    	b emulate			@ if r0 != 0, goto EmulateAll
 
-	@ We need to be prepared for the instruction at .Lx1 or .Lx2
-	@ to fault.
+	@ We need to be prepared for the instructions at .Lx1 and .Lx2 
+	@ to fault.  Emit the appropriate exception gunk to fix things up.
+	@ ??? For some reason, faults can happen at .Lx2 even with a
+	@ plain LDR instruction.  Weird, but it seems harmless.
 	.section .fixup,"ax"
-	.align
-.Lfix:	mov	pc, r9
+	.align	2
+.Lfix:	mov	pc, r9			@ let the user eat segfaults
 	.previous
 
 	.section __ex_table,"a"
-	.align 3
-	.long	.Lx2, .Lfix
+	.align	3
 	.long	.Lx1, .Lfix
+	.long	.Lx2, .Lfix
 	.previous

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)