notaz.gp2x.de
/
picodrive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
df18e71
)
68k, fix idle loop detection crash on 64 bit platforms
author
kub
<derkub@gmail.com>
Tue, 8 Jun 2021 21:11:17 +0000
(23:11 +0200)
committer
kub
<derkub@gmail.com>
Tue, 8 Jun 2021 21:11:17 +0000
(23:11 +0200)
pico/sek.c
patch
|
blob
|
blame
|
history
diff --git
a/pico/sek.c
b/pico/sek.c
index
bd8f70f
..
ccbddb8
100644
(file)
--- a/
pico/sek.c
+++ b/
pico/sek.c
@@
-398,7
+398,7
@@
int SekRegisterIdlePatch(unsigned int pc, int oldop, int newop, void *ctx)
\r
// XXX: probably shouldn't patch RAM too
\r
v = m68k_read16_map[pc >> M68K_MEM_SHIFT];
\r
- if (
!(v & 0x80000000))
\r
+ if (
~v & ~((uptr)-1LL >> 1)) // MSB clear?
\r
target = (u16 *)((v << 1) + pc);
\r
else {
\r
if (++idledet_bads > 128)
\r