From 683352ce030923bdef3cf4fe90d6cb73f4f74529 Mon Sep 17 00:00:00 2001 From: Alejandro Soto Date: Wed, 16 Nov 2022 16:46:52 -0600 Subject: Implement psr read/write logic --- tb/sim/modeswitch.S | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tb/sim/modeswitch.S') diff --git a/tb/sim/modeswitch.S b/tb/sim/modeswitch.S index c04f8a3..52908de 100644 --- a/tb/sim/modeswitch.S +++ b/tb/sim/modeswitch.S @@ -1,5 +1,6 @@ .global reset reset: + mov r6, lr mrs r0, cpsr udf mrs r2, cpsr @@ -12,7 +13,7 @@ reset: nop msr cpsr_fxc, r0 msr spsr_fxc, r0 - mov pc, lr + mov pc, r6 .global undefined undefined: -- cgit v1.2.3