X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=cpu%2FCyclone%2FOpLogic.cpp;h=d6b893337e0b07a8252a3a7e7411db6aded306c6;hb=18b9412743dafb4de7a889b4fba7e34f8a1e8b70;hp=d32d34e7804dced25dc129e6b86910e6a2027cd3;hpb=449ecf9257636348c23bf78bf502c424a48c4201;p=picodrive.git diff --git a/cpu/Cyclone/OpLogic.cpp b/cpu/Cyclone/OpLogic.cpp index d32d34e..d6b8933 100644 --- a/cpu/Cyclone/OpLogic.cpp +++ b/cpu/Cyclone/OpLogic.cpp @@ -40,7 +40,7 @@ int OpBtstReg(int op) EaCalcReadNoSE((type>0)?8:-1,0,tea,size,0x003f); - if (tea>=0x11) + if (tea>=0x10) ot(" and r11,r11,#7 ;@ mem - do mod 8\n"); // size always 0 else ot(" and r11,r11,#31 ;@ reg - do mod 32\n"); // size always 2 ot("\n"); @@ -94,7 +94,7 @@ int OpBtstImm(int op) EaCalcReadNoSE(-1,0,sea,0,0); ot(" mov r11,#1\n"); ot(" bic r10,r10,#0x40000000 ;@ Blank Z flag\n"); - if (tea>=0x11) + if (tea>=0x10) ot(" and r0,r0,#7 ;@ mem - do mod 8\n"); // size always 0 else ot(" and r0,r0,#0x1F ;@ reg - do mod 32\n"); // size always 2 ot(" mov r11,r11,lsl r0 ;@ Make bit mask\n"); @@ -119,6 +119,11 @@ int OpBtstImm(int op) if (type==3) ot(" orr r1,r0,r11 ;@ Set bit\n"); ot("\n"); EaWrite(8, 1,tea,size,0x003f,0,0); +#if CYCLONE_FOR_GENESIS && !MEMHANDLERS_CHANGE_CYCLES + // this is a bit hacky (device handlers might modify cycles) + if (tea==0x38||tea==0x39) + ot(" ldr r5,[r7,#0x5c] ;@ Load Cycles\n"); +#endif } OpEnd(sea,tea); @@ -301,7 +306,7 @@ int OpSet(int op) { int cc=0,ea=0; int size=0,use=0,changed_cycles=0; - char *cond[16]= + static const char * const cond[16]= { "al","", "hi","ls","cc","cs","ne","eq", "vc","vs","pl","mi","ge","lt","gt","le"