notaz.gp2x.de
/
picodrive.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
svp compiler: few more optimizations
[picodrive.git]
/
cpu
/
Cyclone
/
OpArith.cpp
diff --git
a/cpu/Cyclone/OpArith.cpp
b/cpu/Cyclone/OpArith.cpp
index
47ff8b1
..
3aebd8f
100644
(file)
--- a/
cpu/Cyclone/OpArith.cpp
+++ b/
cpu/Cyclone/OpArith.cpp
@@
-346,7
+346,7
@@
int OpMul(int op)
if (type==0) // div
\r
{
\r
ot("divzero%.4x%s\n",op,ms?"":":");
\r
if (type==0) // div
\r
{
\r
ot("divzero%.4x%s\n",op,ms?"":":");
\r
- ot(" mov r0,#
0x14
;@ Divide by zero\n");
\r
+ ot(" mov r0,#
5
;@ Divide by zero\n");
\r
ot(" bl Exception\n");
\r
Cycles+=38;
\r
OpEnd(ea);
\r
ot(" bl Exception\n");
\r
Cycles+=38;
\r
OpEnd(ea);
\r
@@
-553,17
+553,18
@@
int OpAritha(int op)
\r
// EA calculation order defines how situations like suba.w (A0)+, A0 get handled.
\r
// different emus act differently in this situation, I couldn't fugure which is right behaviour.
\r
\r
// EA calculation order defines how situations like suba.w (A0)+, A0 get handled.
\r
// different emus act differently in this situation, I couldn't fugure which is right behaviour.
\r
- // This is Musashi's behaviour.
\r
- if (type == 1)
\r
+ //if (type == 1)
\r
{
\r
EaCalcReadNoSE(-1,0,sea,size,0x003f);
\r
EaCalcReadNoSE(type!=1?10:-1,11,dea,2,0x0e00);
\r
}
\r
{
\r
EaCalcReadNoSE(-1,0,sea,size,0x003f);
\r
EaCalcReadNoSE(type!=1?10:-1,11,dea,2,0x0e00);
\r
}
\r
+#if 0
\r
else
\r
{
\r
EaCalcReadNoSE(type!=1?10:-1,11,dea,2,0x0e00);
\r
EaCalcReadNoSE(-1,0,sea,size,0x003f);
\r
}
\r
else
\r
{
\r
EaCalcReadNoSE(type!=1?10:-1,11,dea,2,0x0e00);
\r
EaCalcReadNoSE(-1,0,sea,size,0x003f);
\r
}
\r
+#endif
\r
\r
if (size<2) ot(" mov r0,r0,asl #%d\n\n",size?16:24);
\r
if (size<2) asr=(char *)(size?",asr #16":",asr #24");
\r
\r
if (size<2) ot(" mov r0,r0,asl #%d\n\n",size?16:24);
\r
if (size<2) asr=(char *)(size?",asr #16":",asr #24");
\r
@@
-804,7
+805,7
@@
int OpChk(int op)
OpEnd(ea);
\r
\r
ot("chktrap%.4x%s ;@ CHK exception:\n",op,ms?"":":");
\r
OpEnd(ea);
\r
\r
ot("chktrap%.4x%s ;@ CHK exception:\n",op,ms?"":":");
\r
- ot(" mov r0,#
0x18
\n");
\r
+ ot(" mov r0,#
6
\n");
\r
ot(" bl Exception\n");
\r
Cycles+=40;
\r
OpEnd(ea);
\r
ot(" bl Exception\n");
\r
Cycles+=40;
\r
OpEnd(ea);
\r