diff --git a/src/test_exception.c b/src/test_exception.c index 84ddcc8..67096eb 100644 --- a/src/test_exception.c +++ b/src/test_exception.c @@ -42,10 +42,14 @@ void _exc_arith(void) void _exc_store_err(void) { - volatile int *pSrc = (int*)SYS_TIMER_SEC; - volatile int *pDst = (int*)0x40000001; + __asm + ( + ".set noreorder\n" + " li $t0, 0x40000000\n" + " sw $0, 1($t0)\n" + ".set reorder\n" - *pDst = *pSrc; + ); } diff --git a/src/test_exception_sim.c b/src/test_exception_sim.c index 57a2dc7..7c9872e 100644 --- a/src/test_exception_sim.c +++ b/src/test_exception_sim.c @@ -46,10 +46,14 @@ void _exc_arith(void) void _exc_store_err(void) { - volatile int *pSrc = (int*)SYS_TIMER_SEC; - volatile int *pDst = (int*)0x80000001; + __asm + ( + ".set noreorder\n" + " li $t0, 0x40000000\n" + " sw $0, 1($t0)\n" + ".set reorder\n" - *pDst = *pSrc; + ); }