notaz.gp2x.de
/
picodrive.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
adjustments for CPU core changes
[picodrive.git]
/
cpu
/
Cyclone
/
Ea.cpp
diff --git
a/cpu/Cyclone/Ea.cpp
b/cpu/Cyclone/Ea.cpp
index
8b103c9
..
35f0048
100644
(file)
--- a/
cpu/Cyclone/Ea.cpp
+++ b/
cpu/Cyclone/Ea.cpp
@@
-98,11
+98,12
@@
static int EaCalcReg(int r,int ea,int mask,int forceor,int shift,int noshift=0)
for (i=mask|0x8000; (i&1)==0; i>>=1) low++; // Find out how high up the EA mask is
\r
mask&=0xf<<low; // This is the max we can do
\r
\r
for (i=mask|0x8000; (i&1)==0; i>>=1) low++; // Find out how high up the EA mask is
\r
mask&=0xf<<low; // This is the max we can do
\r
\r
- if (ea>=8) needor=1; // Need to OR to access A0-7
\r
-
\r
- if (((mask&g_op)>>low)&8) needor=0; // Ah - no we don't actually need to or, since the bit is high in r8
\r
-
\r
- if (forceor) needor=1; // Special case for 0x30-0x38 EAs ;)
\r
+ if (ea>=8)
\r
+ {
\r
+ needor=1; // Need to OR to access A0-7
\r
+ if ((g_op>>low)&8) { needor=0; mask|=8<<low; } // Ah - no we don't actually need to or, since the bit is high in r8
\r
+ if (forceor) needor=1; // Special case for 0x30-0x38 EAs ;)
\r
+ }
\r
\r
ot(" and r%d,r8,#0x%.4x\n",r,mask);
\r
if (needor) ot(" orr r%d,r%d,#0x%x ;@ A0-7\n",r,r,8<<low);
\r
\r
ot(" and r%d,r8,#0x%.4x\n",r,mask);
\r
if (needor) ot(" orr r%d,r%d,#0x%x ;@ A0-7\n",r,r,8<<low);
\r