notaz.gp2x.de
/
picodrive.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
adjustments for CPU core changes
[picodrive.git]
/
cpu
/
Cyclone
/
OpLogic.cpp
diff --git
a/cpu/Cyclone/OpLogic.cpp
b/cpu/Cyclone/OpLogic.cpp
index
7623704
..
65d2293
100644
(file)
--- 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");
\r
}
\r
\r
ot("\n");
\r
}
\r
\r
- if (type==0 && dir) ot("
mov r3,r0 ;@ save old value for V flag calculation
\n");
\r
+ if (type==0 && dir) ot("
adds r3,r0,#0 ;@ save old value for V flag calculation, also clear V
\n");
\r
\r
ot(";@ Shift register:\n");
\r
if (type==0) ot(" movs r0,r0,%s %s\n",dir?"asl":"asr",pct);
\r
\r
ot(";@ Shift register:\n");
\r
if (type==0) ot(" movs r0,r0,%s %s\n",dir?"asl":"asr",pct);
\r
@@
-434,7
+434,8
@@
static int EmitAsr(int op,int type,int dir,int count,int size,int usereg)
ot(" mov r1,#0x80000000\n");
\r
ot(" ands r3,r3,r1,asr %s\n", pct);
\r
ot(" cmpne r3,r1,asr %s\n", pct);
\r
ot(" mov r1,#0x80000000\n");
\r
ot(" ands r3,r3,r1,asr %s\n", pct);
\r
ot(" cmpne r3,r1,asr %s\n", pct);
\r
- ot(" biceq r9,r9,#0x10000000\n");
\r
+ ot(" eoreq r1,r0,r3\n"); // above check doesn't catch (-1)<<(32+), so we need this
\r
+ ot(" tsteq r1,#0x80000000\n");
\r
ot(" orrne r9,r9,#0x10000000\n");
\r
ot("\n");
\r
}
\r
ot(" orrne r9,r9,#0x10000000\n");
\r
ot("\n");
\r
}
\r