summaryrefslogtreecommitdiff
path: root/cpu.c
diff options
context:
space:
mode:
authorDavid Guillen Fandos2021-06-30 00:29:21 +0200
committerDavid Guillen Fandos2021-07-01 12:06:57 +0200
commit836e51b694f33d864cf4962d1dd3718bb56803c6 (patch)
treed49064abd60e6e2575ed433be8c038a65058f259 /cpu.c
parent48f1a71fb7b1d551295aec7ea44f5529c87bff93 (diff)
downloadpicogpsp-836e51b694f33d864cf4962d1dd3718bb56803c6.tar.gz
picogpsp-836e51b694f33d864cf4962d1dd3718bb56803c6.tar.bz2
picogpsp-836e51b694f33d864cf4962d1dd3718bb56803c6.zip
Fix some UB behaviour
Diffstat (limited to 'cpu.c')
-rw-r--r--cpu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cpu.c b/cpu.c
index 873a5e3..60ff3bc 100644
--- a/cpu.c
+++ b/cpu.c
@@ -266,7 +266,7 @@ void print_register_usage(void)
using_register_list(arm, reg_list, 16) \
#define arm_decode_branch() \
- s32 offset = ((s32)(opcode & 0xFFFFFF) << 8) >> 6 \
+ s32 offset = ((s32)((u32)(opcode << 8))) >> 6 \
#define thumb_decode_shift() \