notaz.gp2x.de
/
cyclone68000.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e5b2956
)
fix pc relative addressing
author
Grazvydas Ignotas
<notasas@gmail.com>
Sat, 10 Aug 2013 13:54:01 +0000
(16:54 +0300)
committer
Grazvydas Ignotas
<notasas@gmail.com>
Sat, 10 Aug 2013 13:54:01 +0000
(16:54 +0300)
Ea.cpp
patch
|
blob
|
blame
|
history
diff --git
a/Ea.cpp
b/Ea.cpp
index
606e8f4
..
234d469
100644
(file)
--- a/
Ea.cpp
+++ b/
Ea.cpp
@@
-255,8
+255,7
@@
int EaCalc(int a,int mask,int ea,int size,int top,int sign_extend)
ot(" ldr r0,[r7,#0x60] ;@ Get Memory base\n");
\r
ot(" sub r0,r4,r0 ;@ Real PC\n");
\r
ot(" ldrsh r2,[r4],#2 ;@ Fetch extension\n"); pc_dirty=1;
\r
ot(" ldr r0,[r7,#0x60] ;@ Get Memory base\n");
\r
ot(" sub r0,r4,r0 ;@ Real PC\n");
\r
ot(" ldrsh r2,[r4],#2 ;@ Fetch extension\n"); pc_dirty=1;
\r
- ot(" mov r0,r0,lsl #8\n");
\r
- ot(" add r%d,r2,r0,asr #8 ;@ ($nn,PC)\n",a);
\r
+ ot(" add r%d,r2,r0 ;@ ($nn,PC)\n",a);
\r
Cycles+=size<2 ? 8:12; // Extra cycles
\r
return 0;
\r
}
\r
Cycles+=size<2 ? 8:12; // Extra cycles
\r
return 0;
\r
}
\r
@@
-267,7
+266,6
@@
int EaCalc(int a,int mask,int ea,int size,int top,int sign_extend)
ot(" ldrh r3,[r4] ;@ Get extension word\n");
\r
ot(" sub r0,r4,r0 ;@ r0=PC\n");
\r
ot(" add r4,r4,#2\n"); pc_dirty=1;
\r
ot(" ldrh r3,[r4] ;@ Get extension word\n");
\r
ot(" sub r0,r4,r0 ;@ r0=PC\n");
\r
ot(" add r4,r4,#2\n"); pc_dirty=1;
\r
- ot(" mov r0,r0,asl #8 ;@ use only 24bits of PC\n");
\r
ot(" mov r2,r3,lsr #10\n");
\r
ot(" tst r3,#0x0800 ;@ Is Rn Word or Long\n");
\r
ot(" and r2,r2,#0x3c ;@ r2=Index of Rn\n");
\r
ot(" mov r2,r3,lsr #10\n");
\r
ot(" tst r3,#0x0800 ;@ Is Rn Word or Long\n");
\r
ot(" and r2,r2,#0x3c ;@ r2=Index of Rn\n");
\r
@@
-275,7
+273,7
@@
int EaCalc(int a,int mask,int ea,int size,int top,int sign_extend)
ot(" ldrne r2,[r7,r2] ;@ r2=Rn.l\n");
\r
ot(" mov r3,r3,asl #24 ;@ r3=Get 8-bit signed Disp\n");
\r
ot(" add r2,r2,r3,asr #24 ;@ r2=Disp+Rn\n");
\r
ot(" ldrne r2,[r7,r2] ;@ r2=Rn.l\n");
\r
ot(" mov r3,r3,asl #24 ;@ r3=Get 8-bit signed Disp\n");
\r
ot(" add r2,r2,r3,asr #24 ;@ r2=Disp+Rn\n");
\r
- ot(" add r%d,r2,r0
,asr #8
;@ r%d=Disp+PC+Rn\n",a,a);
\r
+ ot(" add r%d,r2,r0 ;@ r%d=Disp+PC+Rn\n",a,a);
\r
Cycles+=size<2 ? 10:14; // Extra cycles
\r
return 0;
\r
}
\r
Cycles+=size<2 ? 10:14; // Extra cycles
\r
return 0;
\r
}
\r