Mercurial > repos > blastem
comparison m68k_core.c @ 2346:0111c8344477
Fix some issues identified by asan/ubsan
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Sat, 07 Oct 2023 18:04:35 -0700 |
parents | 31fc1186ffbb |
children | f8b5142c06aa |
comparison
equal
deleted
inserted
replaced
2345:c76c81c21ae5 | 2346:0111c8344477 |
---|---|
1219 if (!(context->status & 0x20)) { | 1219 if (!(context->status & 0x20)) { |
1220 //switching from user to system mode so swap stack pointers | 1220 //switching from user to system mode so swap stack pointers |
1221 context->aregs[8] = context->aregs[7]; | 1221 context->aregs[8] = context->aregs[7]; |
1222 } | 1222 } |
1223 context->status = 0x27; | 1223 context->status = 0x27; |
1224 context->aregs[7] = reset_vec[0] << 16 | reset_vec[1]; | 1224 context->aregs[7] = ((uint32_t)reset_vec[0]) << 16 | reset_vec[1]; |
1225 uint32_t address = reset_vec[2] << 16 | reset_vec[3]; | 1225 uint32_t address = ((uint32_t)reset_vec[2]) << 16 | reset_vec[3]; |
1226 //interrupt mask may have changed so force a sync | 1226 //interrupt mask may have changed so force a sync |
1227 context->options->sync_components(context, address); | 1227 context->options->sync_components(context, address); |
1228 start_68k_context(context, address); | 1228 start_68k_context(context, address); |
1229 } | 1229 } |
1230 | 1230 |