Skip to content

Commit

Permalink
fix compatibility with ancient gas
Browse files Browse the repository at this point in the history
  • Loading branch information
notaz committed Dec 7, 2019
1 parent 5fc93bd commit 94a9d9a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions OpArith.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ int OpAbcd(int op)
ot(" add r1,r1,r0\n");
ot(" add r1,r1,r6\n");
ot(" mov r12,r1\n");
ot(" addhi r12,#6 ;@ Decimal adjust units\n");
ot(" addhi r12,r12,#6 ;@ Decimal adjust units\n");
ot(" tst r1,#0x80\n");
ot(" orreq r10,r10,#0x10000000 ;@ Undefined V behavior\n");
ot(" cmp r12,#0x9f\n");
Expand All @@ -452,7 +452,7 @@ int OpAbcd(int op)
ot(" cmp r1,r12\n");
ot(" orrlt r10,r10,#0x20000000 ;@ C\n");
ot(" cmp r1,#0xff\n");
ot(" addhi r1,#0xa0\n");
ot(" addhi r1,r1,#0xa0\n");
ot(" sub r12,r1,r12\n");
ot(" movs r0,r12,lsl #24\n");
ot(" bicmi r10,r10,#0x10000000 ;@ Undefined V behavior part II\n");
Expand Down
4 changes: 2 additions & 2 deletions OpLogic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,12 @@ const char *TestCond(int m68k_cc, int invert)
break;
case 0x0e: // gt
ot(" eor r0,r10,r10,lsl #3 ;@ gt: !Z && N == V\n");
ot(" orrs r0,r10,lsl #1\n");
ot(" orrs r0,r0,r10,lsl #1\n");
cond="pl", icond="mi";
break;
case 0x0f: // le
ot(" eor r0,r10,r10,lsl #3 ;@ le: Z || N != V\n");
ot(" orrs r0,r10,lsl #1\n");
ot(" orrs r0,r0,r10,lsl #1\n");
cond="mi", icond="pl";
break;
default:
Expand Down

0 comments on commit 94a9d9a

Please sign in to comment.