X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=cpu%2FCyclone%2FOpLogic.cpp;h=65d229379cd4308e8dadc164689f6cc30213dc02;hb=1c88b865ceb1e1801bcf20010088fd62cdf2cc06;hp=762370490078cb9c5592fd61103ea6d6fe4de713;hpb=2d0b15bb2c532cacdbc8fcecb915177b1bd5f2af;p=picodrive.git diff --git a/cpu/Cyclone/OpLogic.cpp b/cpu/Cyclone/OpLogic.cpp index 7623704..65d2293 100644 --- a/cpu/Cyclone/OpLogic.cpp +++ b/cpu/Cyclone/OpLogic.cpp @@ -403,7 +403,7 @@ static int EmitAsr(int op,int type,int dir,int count,int size,int usereg) ot("\n"); } - if (type==0 && dir) ot(" mov r3,r0 ;@ save old value for V flag calculation\n"); + if (type==0 && dir) ot(" adds r3,r0,#0 ;@ save old value for V flag calculation, also clear V\n"); ot(";@ Shift register:\n"); if (type==0) ot(" movs r0,r0,%s %s\n",dir?"asl":"asr",pct); @@ -434,7 +434,8 @@ static int EmitAsr(int op,int type,int dir,int count,int size,int usereg) ot(" mov r1,#0x80000000\n"); ot(" ands r3,r3,r1,asr %s\n", pct); ot(" cmpne r3,r1,asr %s\n", pct); - ot(" biceq r9,r9,#0x10000000\n"); + ot(" eoreq r1,r0,r3\n"); // above check doesn't catch (-1)<<(32+), so we need this + ot(" tsteq r1,#0x80000000\n"); ot(" orrne r9,r9,#0x10000000\n"); ot("\n"); }