summaryrefslogtreecommitdiff
path: root/libcpu/mips
diff options
context:
space:
mode:
Diffstat (limited to 'libcpu/mips')
-rw-r--r--libcpu/mips/common/exception.c6
-rw-r--r--libcpu/mips/common/stackframe.h4
2 files changed, 5 insertions, 5 deletions
diff --git a/libcpu/mips/common/exception.c b/libcpu/mips/common/exception.c
index 11192955cf..cd7d97e6c0 100644
--- a/libcpu/mips/common/exception.c
+++ b/libcpu/mips/common/exception.c
@@ -117,14 +117,14 @@ int rt_hw_exception_init(void)
void rt_general_exc_dispatch(struct pt_regs *regs)
{
- rt_ubase_t cause, exccode;
+ rt_ubase_t exccode = 0;
- exccode = (cause & CAUSEF_EXCCODE) >> CAUSEB_EXCCODE;
if (exccode == 0) {
rt_ubase_t status, pending;
status = read_c0_status();
- pending = (cause & CAUSEF_IP) & (status & ST0_IM);
+
+ pending = (CAUSEF_IP) & (status & ST0_IM);
if (pending & CAUSEF_IP0)
rt_do_mips_cpu_irq(0);
if (pending & CAUSEF_IP1)
diff --git a/libcpu/mips/common/stackframe.h b/libcpu/mips/common/stackframe.h
index b5a038d1f6..258f9a994f 100644
--- a/libcpu/mips/common/stackframe.h
+++ b/libcpu/mips/common/stackframe.h
@@ -60,11 +60,11 @@
mfhi v1
LONG_S $8, PT_R8(sp)
LONG_S $9, PT_R9(sp)
- LONG_S v1, PT_HI(sp)
+ sw v1, PT_HI(sp)
mflo v1
LONG_S $10, PT_R10(sp)
LONG_S $11, PT_R11(sp)
- LONG_S v1, PT_LO(sp)
+ sw v1, PT_LO(sp)
LONG_S $12, PT_R12(sp)
LONG_S $13, PT_R13(sp)
LONG_S $14, PT_R14(sp)