X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=Ea.cpp;h=234d4698887355ded793cf6c2be757611db7e389;hb=c6237d9e43c8a8854155757b80b77161a9570535;hp=77c282b6e109ee700a24b86a957e9b76a4ec626d;hpb=52ac6b1c8f65fe2477ffc3a7fc63ca8ae9d7e59f;p=cyclone68000.git diff --git a/Ea.cpp b/Ea.cpp index 77c282b..234d469 100644 --- a/Ea.cpp +++ b/Ea.cpp @@ -141,10 +141,8 @@ static int EaCalcReg(int r,int ea,int mask,int forceor,int shift,int noshift=0) int EaCalc(int a,int mask,int ea,int size,int top,int sign_extend) { char text[32]=""; - int func=0; DisaPc=2; DisaGetEa(text,ea,size); // Get text version of the effective address - func=0x68+(size<<2); // Get correct read handler if (ea<0x10) { @@ -257,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"); ot(" sub r0,r4,r0 ;@ Real PC\n"); ot(" ldrsh r2,[r4],#2 ;@ Fetch extension\n"); pc_dirty=1; - ot(" mov r0,r0,lsl #8\n"); - ot(" add r%d,r2,r0,asr #8 ;@ ($nn,PC)\n",a); + ot(" add r%d,r2,r0 ;@ ($nn,PC)\n",a); Cycles+=size<2 ? 8:12; // Extra cycles return 0; } @@ -269,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"); ot(" sub r0,r4,r0 ;@ r0=PC\n"); ot(" add r4,r4,#2\n"); pc_dirty=1; - ot(" mov r0,r0,asl #8 ;@ use only 24bits of PC\n"); ot(" mov r2,r3,lsr #10\n"); ot(" tst r3,#0x0800 ;@ Is Rn Word or Long\n"); ot(" and r2,r2,#0x3c ;@ r2=Index of Rn\n"); @@ -277,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"); ot(" mov r3,r3,asl #24 ;@ r3=Get 8-bit signed Disp\n"); ot(" add r2,r2,r3,asr #24 ;@ r2=Disp+Rn\n"); - ot(" add r%d,r2,r0,asr #8 ;@ r%d=Disp+PC+Rn\n",a,a); + ot(" add r%d,r2,r0 ;@ r%d=Disp+PC+Rn\n",a,a); Cycles+=size<2 ? 10:14; // Extra cycles return 0; }