ref: d76feb058d14da86c5b4bd887dd8887f7034e73a
parent: c75921a96eb005b11144df5169064721e64d640b
author: Ori Bernstein <[email protected]>
date: Tue Jul 17 10:20:57 EDT 2012
Fix code generation for compares. The instruction format was overly strict.
--- a/8/insns.def
+++ b/8/insns.def
@@ -20,37 +20,37 @@
Insn(Inone, "BAD_INSN", Use(), Def())
/* Note, the mov instruction is specified in an overly general manner. */
-Insn(Imov, "\tmov%t %x,%x\n", Use(.l={1}), Def(.l={2}))
-Insn(Imovz, "\tmovz%1t%2t %x,%x\n", Use(.l={1}), Def(.l={2}))
-Insn(Imovs, "\tmovs%1t%2t %x,%x\n", Use(.l={1}), Def(.l={2}))
-Insn(Ilea, "\tlea%t %m,%r\n", Use(.l={1}), Def(.l={2}))
+Insn(Imov, "\tmov%t %x,%x\n", Use(.l={1}), Def(.l={2}))
+Insn(Imovz, "\tmovz%1t%2t %x,%x\n", Use(.l={1}), Def(.l={2}))
+Insn(Imovs, "\tmovs%1t%2t %x,%x\n", Use(.l={1}), Def(.l={2}))
+Insn(Ilea, "\tlea%t %m,%r\n", Use(.l={1}), Def(.l={2}))
-Insn(Iadd, "\tadd%t %x,%r\n", Use(.l={1,2}), Def(.l={2}))
-Insn(Isub, "\tsub%t %x,%r\n", Use(.l={1,2}), Def(.l={2}))
-Insn(Imul, "\tmul%t %r\n", Use(.l={1},.r={Reax}), Def(.r={Reax,Redx}))
-Insn(Idiv, "\tdiv%t %r\n", Use(.l={1},.r={Reax,Redx}), Def(.r={Reax,Redx}))
-Insn(Ineg, "\tneg%t %r\n", Use(.l={1}), Def(.l={1}))
-Insn(Iand, "\tand%t %x,%r\n", Use(.l={1,2}), Def(.l={2}))
-Insn(Ior, "\tor%t %x,%r\n", Use(.l={1,2}), Def(.l={2}))
-Insn(Ixor, "\txor%t %x,%r\n", Use(.l={1,2}), Def(.l={2}))
-Insn(Inot, "\tnot%t %v\n", Use(.l={1}), Def(.l={1}))
-Insn(Ishl, "\tsal%2t %u,%r\n", Use(.l={1,2}), Def(.l={2}))
-Insn(Isar, "\tshr%2t %u,%r\n", Use(.l={1,2}), Def(.l={2}))
-Insn(Ishr, "\tshr%2t %u,%r\n", Use(.l={1,2}), Def(.l={2}))
+Insn(Iadd, "\tadd%t %x,%r\n", Use(.l={1,2}), Def(.l={2}))
+Insn(Isub, "\tsub%t %x,%r\n", Use(.l={1,2}), Def(.l={2}))
+Insn(Imul, "\tmul%t %r\n", Use(.l={1},.r={Reax}), Def(.r={Reax,Redx}))
+Insn(Idiv, "\tdiv%t %r\n", Use(.l={1},.r={Reax,Redx}), Def(.r={Reax,Redx}))
+Insn(Ineg, "\tneg%t %r\n", Use(.l={1}), Def(.l={1}))
+Insn(Iand, "\tand%t %x,%r\n", Use(.l={1,2}), Def(.l={2}))
+Insn(Ior, "\tor%t %x,%r\n", Use(.l={1,2}), Def(.l={2}))
+Insn(Ixor, "\txor%t %x,%r\n", Use(.l={1,2}), Def(.l={2}))
+Insn(Inot, "\tnot%t %v\n", Use(.l={1}), Def(.l={1}))
+Insn(Ishl, "\tsal%2t %u,%r\n", Use(.l={1,2}), Def(.l={2}))
+Insn(Isar, "\tshr%2t %u,%r\n", Use(.l={1,2}), Def(.l={2}))
+Insn(Ishr, "\tshr%2t %u,%r\n", Use(.l={1,2}), Def(.l={2}))
-Insn(Itest, "\ttest%t %u,%r\n", Use(.l={1,2}), Def(.l={2}))
-Insn(Icmp, "\tcmp%t %u,%r\n", Use(.l={1,2}), Def(.l={2}))
+Insn(Itest, "\ttest%t %x,%r\n", Use(.l={1,2}), Def(.l={2}))
+Insn(Icmp, "\tcmp%t %x,%r\n", Use(.l={1,2}), Def(.l={2}))
-Insn(Ipush, "\tpush%t %r\n", Use(.l={1}), Def())
-Insn(Ipop, "\tpop%t %r\n", Use(.l={1}), Def())
+Insn(Ipush, "\tpush%t %r\n", Use(.l={1}), Def())
+Insn(Ipop, "\tpop%t %r\n", Use(.l={1}), Def())
/* branch instructions */
-Insn(Isetz, "\tsetz %v\n", Use(), Def(.l={1}))
-Insn(Isetnz, "\tsetnz %v\n", Use(), Def(.l={1}))
-Insn(Isetlt, "\tsetlt %v\n", Use(), Def(.l={1}))
-Insn(Isetle, "\tsetle %v\n", Use(), Def(.l={1}))
-Insn(Isetgt, "\tsetgt %v\n", Use(), Def(.l={1}))
-Insn(Isetge, "\tsetge %v\n", Use(), Def(.l={1}))
+Insn(Isetz, "\tsetz %v\n", Use(), Def(.l={1}))
+Insn(Isetnz, "\tsetnz %v\n", Use(), Def(.l={1}))
+Insn(Isetlt, "\tsetlt %v\n", Use(), Def(.l={1}))
+Insn(Isetle, "\tsetle %v\n", Use(), Def(.l={1}))
+Insn(Isetgt, "\tsetgt %v\n", Use(), Def(.l={1}))
+Insn(Isetge, "\tsetge %v\n", Use(), Def(.l={1}))
/* branch instructions */
Insn(Icall, "\tcall %v\n", Use(.l={1}), Def())