[llvm-commits] CVS: llvm/lib/Target/ARM/ARMInstrInfo.td
Rafael Espindola
rafael.espindola at gmail.com
Mon Oct 16 11:39:37 PDT 2006
Changes in directory llvm/lib/Target/ARM:
ARMInstrInfo.td updated: 1.55 -> 1.56
---
Log message:
define the DFPBinOp class
---
Diffs of the changes: (+10 -15)
ARMInstrInfo.td | 25 ++++++++++---------------
1 files changed, 10 insertions(+), 15 deletions(-)
Index: llvm/lib/Target/ARM/ARMInstrInfo.td
diff -u llvm/lib/Target/ARM/ARMInstrInfo.td:1.55 llvm/lib/Target/ARM/ARMInstrInfo.td:1.56
--- llvm/lib/Target/ARM/ARMInstrInfo.td:1.55 Mon Oct 16 13:32:36 2006
+++ llvm/lib/Target/ARM/ARMInstrInfo.td Mon Oct 16 13:39:22 2006
@@ -56,6 +56,11 @@
!strconcat(OpcStr, " $dst, $a, $b"),
[(set FPRegs:$dst, (OpNode FPRegs:$a, FPRegs:$b))]>;
+class DFPBinOp<string OpcStr, SDNode OpNode> :
+ InstARM<(ops DFPRegs:$dst, DFPRegs:$a, DFPRegs:$b),
+ !strconcat(OpcStr, " $dst, $a, $b"),
+ [(set DFPRegs:$dst, (OpNode DFPRegs:$a, DFPRegs:$b))]>;
+
class Addr1BinOp<string OpcStr, SDNode OpNode> :
InstARM<(ops IntRegs:$dst, IntRegs:$a, op_addr_mode1:$b),
!strconcat(OpcStr, " $dst, $a, $b"),
@@ -256,17 +261,10 @@
def FMSTAT : InstARM<(ops ), "fmstat", [(armfmstat)]>;
// Floating Point Arithmetic
-def FADDS : FPBinOp<"fadds", fadd>;
-
-def FADDD : InstARM<(ops DFPRegs:$dst, DFPRegs:$a, DFPRegs:$b),
- "faddd $dst, $a, $b",
- [(set DFPRegs:$dst, (fadd DFPRegs:$a, DFPRegs:$b))]>;
-
-def FSUBS : FPBinOp<"fsubs", fsub>;
-
-def FSUBD : InstARM<(ops DFPRegs:$dst, DFPRegs:$a, DFPRegs:$b),
- "fsubd $dst, $a, $b",
- [(set DFPRegs:$dst, (fsub DFPRegs:$a, DFPRegs:$b))]>;
+def FADDS : FPBinOp<"fadds", fadd>;
+def FADDD : DFPBinOp<"faddd", fadd>;
+def FSUBS : FPBinOp<"fsubs", fsub>;
+def FSUBD : DFPBinOp<"fsubd", fsub>;
def FNEGS : InstARM<(ops FPRegs:$dst, FPRegs:$src),
"fnegs $dst, $src",
@@ -277,10 +275,7 @@
[(set DFPRegs:$dst, (fneg DFPRegs:$src))]>;
def FMULS : FPBinOp<"fmuls", fmul>;
-
-def FMULD : InstARM<(ops DFPRegs:$dst, DFPRegs:$a, DFPRegs:$b),
- "fmuld $dst, $a, $b",
- [(set DFPRegs:$dst, (fmul DFPRegs:$a, DFPRegs:$b))]>;
+def FMULD : DFPBinOp<"fmuld", fmul>;
// Floating Point Load
More information about the llvm-commits
mailing list