summaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel/gdb-low.S
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1997-03-25 23:40:36 +0000
committer <ralf@linux-mips.org>1997-03-25 23:40:36 +0000
commit7206675c40394c78a90e74812bbdbf8cf3cca1be (patch)
tree251895cf5a0008e2b4ce438cb01ad4d55fb5b97b /arch/mips/kernel/gdb-low.S
parentbeb116954b9b7f3bb56412b2494b562f02b864b1 (diff)
Import of Linux/MIPS 2.1.14.2
Diffstat (limited to 'arch/mips/kernel/gdb-low.S')
-rw-r--r--arch/mips/kernel/gdb-low.S21
1 files changed, 14 insertions, 7 deletions
diff --git a/arch/mips/kernel/gdb-low.S b/arch/mips/kernel/gdb-low.S
index 9b948a845..9bc35400b 100644
--- a/arch/mips/kernel/gdb-low.S
+++ b/arch/mips/kernel/gdb-low.S
@@ -9,6 +9,7 @@
#include <linux/sys.h>
#include <asm/asm.h>
+#include <asm/segment.h>
#include <asm/mipsregs.h>
#include <asm/mipsconfig.h>
#include <asm/regdef.h>
@@ -33,7 +34,8 @@
*/
lui k1,%hi(kernelsp)
lw k1,%lo(kernelsp)(k1)
-1: move k0,sp
+1:
+ move k0,sp
subu sp,k1,GDB_FR_SIZE
sw k0,GDB_FR_REG29(sp)
sw v0,GDB_FR_REG2(sp)
@@ -100,8 +102,9 @@
mfc0 v0,CP0_STATUS /* check if the FPU is enabled */
srl v0,v0,16
andi v0,v0,(ST0_CU1 >> 16)
+
beqz v0,2f /* disabled, skip */
- nop
+ nop
swc1 $0,GDB_FR_FPR0(sp)
swc1 $1,GDB_FR_FPR1(sp)
@@ -149,7 +152,8 @@
* current stack frame ptr
*/
-2: sw sp,GDB_FR_FRP(sp)
+2:
+ sw sp,GDB_FR_FRP(sp)
/*
* CP0 registers (R4000/R4400 unused registers skipped)
@@ -179,8 +183,9 @@
*/
move a0,sp
+
jal handle_exception
- nop
+ nop
/*
* restore all writable registers, in reverse order
@@ -207,8 +212,9 @@
mfc0 v0,CP0_STATUS /* check if the FPU is enabled */
srl v0,v0,16
andi v0,v0,(ST0_CU1 >> 16)
+
beqz v0,3f /* disabled, skip */
- nop
+ nop
lwc1 $31,GDB_FR_FPR31(sp)
lwc1 $30,GDB_FR_FPR30(sp)
@@ -247,7 +253,8 @@
* Now the CP0 and integer registers
*/
-3: mfc0 t0,CP0_STATUS
+3:
+ mfc0 t0,CP0_STATUS
ori t0,0x1f
xori t0,0x1f
mtc0 t0,CP0_STATUS
@@ -292,7 +299,7 @@
lw $1,GDB_FR_REG1(sp)
lw sp,GDB_FR_REG29(sp) /* Deallocate stack */
- ERET
+ eret
.set at
.set reorder
END(trap_low)