X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=cpu%2FCyclone%2FOpMove.cpp;h=78adae5bc52dffd709e51d72a8064ec3b39c5234;hb=e898de13cdd5416507675f175958204c5e9f27e9;hp=be91b18aacbe7bc256046fd6b55ceab779883684;hpb=8527dc450a96f7a292b7f302e8e55147628b6042;p=picodrive.git diff --git a/cpu/Cyclone/OpMove.cpp b/cpu/Cyclone/OpMove.cpp index be91b18..78adae5 100644 --- a/cpu/Cyclone/OpMove.cpp +++ b/cpu/Cyclone/OpMove.cpp @@ -121,16 +121,18 @@ int OpMove(int op) OpStart(op,sea,tea); Cycles=4; - EaCalcRead(-1,1,sea,size,0x003f); - if (movea==0) { - ot(" adds r1,r1,#0 ;@ Defines NZ, clears CV\n"); + EaCalcRead(-1,0,sea,size,0x003f); + ot(" adds r1,r0,#0 ;@ Defines NZ, clears CV\n"); ot(" mrs r10,cpsr ;@ r10=NZCV flags\n"); ot("\n"); } - - if (movea) size=2; // movea always expands to 32-bits + else + { + EaCalcRead(-1,1,sea,size,0x003f); + size=2; // movea always expands to 32-bits + } eawrite_check_addrerr=1; #if SPLIT_MOVEL_PD @@ -149,8 +151,8 @@ int OpMove(int op) } #if CYCLONE_FOR_GENESIS && !MEMHANDLERS_CHANGE_CYCLES - // this is a bit hacky - if ((tea==0x39||(tea>=0x10&&tea<0x30))&&size>=1) + // this is a bit hacky (device handlers might modify cycles) + if (tea==0x39||((0x10<=tea&&tea<0x30)&&size>=1)) ot(" ldr r5,[r7,#0x5c] ;@ Load Cycles\n"); #endif