CMI was translated wrongly; corrected
This commit is contained in:
parent
23be652f11
commit
bf3cfae610
|
@ -1854,8 +1854,15 @@ pat tge ior $2==4 call txxior("bgt")
|
|||
pat tgt ior $2==4 call txxior("bge")
|
||||
|
||||
pat cmi $1==4
|
||||
with src4 REG
|
||||
gen subd %1, %2 yields %2
|
||||
with src4 src4
|
||||
uses REG={const4, 0}
|
||||
gen cmpd %2, %1
|
||||
blt {label, "1f"}
|
||||
shid %a
|
||||
br {label, "2f"}
|
||||
1:
|
||||
addd {const4, 0-1}, %a
|
||||
2: yields %a
|
||||
|
||||
#ifndef NOFLOAT
|
||||
pat cmf $1==4
|
||||
|
|
|
@ -1804,15 +1804,16 @@ lar !defined($1) | | remove(all)
|
|||
* group 12 : Compare instructions *
|
||||
****************************************/
|
||||
|
||||
cmi $1==2 | source2 SCR_REG |
|
||||
"sub %[1],%[2]"
|
||||
setcc(%[2])
|
||||
erase(%[2]) | %[2] | |
|
||||
... | SCR_REG source2 |
|
||||
"sub %[2],%[1]"
|
||||
"neg %[1]"
|
||||
setcc(%[1])
|
||||
erase(%[1]) | %[1] | |
|
||||
cmi $1==2 | source2 source2 |
|
||||
allocate(REG = {CONST2,0})
|
||||
"cmp %[1],%[2]"
|
||||
"beq 2f"
|
||||
"bgt 1f"
|
||||
"inc %[a]"
|
||||
"br 2f"
|
||||
"1:\tdec %[a]\n2:"
|
||||
setcc(%[a])
|
||||
erase(%[a]) | %[a] | |
|
||||
ldc cmi zlt highw(1)==0 && loww(1)==0 && $2==4 | source2 source2 |
|
||||
| %[1] | zlt $3 |
|
||||
ldc cmi zge highw(1)==0 && loww(1)==0 && $2==4 | source2 source2 |
|
||||
|
|
|
@ -1632,11 +1632,16 @@ gen jsr pc,{label, "ilar~"}
|
|||
****************************************/
|
||||
|
||||
pat cmi $1==2
|
||||
with src2 REG
|
||||
gen sub %1,%2 yields %2
|
||||
with REG src2
|
||||
gen sub %2,%1
|
||||
neg %1 yields %1
|
||||
with src2 src2
|
||||
uses REG = {const2,0}
|
||||
gen cmp %1,%2
|
||||
beq {label,2f}
|
||||
bgt {label,1f}
|
||||
inc %a
|
||||
br {label,2f}
|
||||
1:
|
||||
dec %a
|
||||
2: yields %a
|
||||
|
||||
pat cmi $1==4
|
||||
kills ALL
|
||||
|
|
|
@ -1157,7 +1157,22 @@ lae lar defined(rom(1,3)) | | | | lae $1 aar $2 loi rom(1,3) |
|
|||
******** GROUP 12 ********
|
||||
***************************************/
|
||||
|
||||
cmi $1==2 | | | | sbi $1 |
|
||||
cmi $1==2 | src2 REG | allocate( REG = {im2, 0} )
|
||||
"cp %[2], %[1]"
|
||||
"jr EQ, 2f"
|
||||
"jr LT, 1f"
|
||||
"inc %[a]"
|
||||
"jr 2f"
|
||||
"1:\tdec %[a]\n2:"
|
||||
erase(%[a]) nocc | %[a] | |
|
||||
... | NC im2 src2a | allocate( REG = {im2, 0} )
|
||||
"cp %[2], %[1]"
|
||||
"jr EQ, 2f"
|
||||
"jr LT, 1f"
|
||||
"inc %[a]"
|
||||
"jr 2f"
|
||||
"1:\tdec %[a]\n2:"
|
||||
erase(%[a]) nocc | %[a] | |
|
||||
cmi $1==4 | STACK | "calr cmi4" | R0 | |
|
||||
cmi !defined($1)| src2 STACK | move( %[1], R0 )
|
||||
"calr cmi"
|
||||
|
|
Loading…
Reference in a new issue