From 13e1501c91e3e56740a59eb7dab173c1d0cf5765 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 16 Dec 2005 07:18:48 +0000 Subject: [PATCH] Add a couple more instrs git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24744 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/Sparc/SparcInstrFormats.td | 6 ++++-- lib/Target/Sparc/SparcInstrInfo.td | 6 ++++-- lib/Target/SparcV8/SparcV8InstrFormats.td | 6 ++++-- lib/Target/SparcV8/SparcV8InstrInfo.td | 6 ++++-- 4 files changed, 16 insertions(+), 8 deletions(-) diff --git a/lib/Target/Sparc/SparcInstrFormats.td b/lib/Target/Sparc/SparcInstrFormats.td index e30edce83c7..d2ed82ebbad 100644 --- a/lib/Target/Sparc/SparcInstrFormats.td +++ b/lib/Target/Sparc/SparcInstrFormats.td @@ -21,11 +21,13 @@ class F2 : InstV8 { // Format 2 instructions // Specific F2 classes: SparcV8 manual, page 44 // -class F2_1 op2Val, string name> : F2 { +class F2_1 op2Val, dag ops, string asmstr> : F2 { bits<5> rd; + dag OperandList = ops; + let AsmString = asmstr; + let op2 = op2Val; - let Name = name; let Inst{29-25} = rd; } diff --git a/lib/Target/Sparc/SparcInstrInfo.td b/lib/Target/Sparc/SparcInstrInfo.td index 1f8349e11bd..ad5325dec62 100644 --- a/lib/Target/Sparc/SparcInstrInfo.td +++ b/lib/Target/Sparc/SparcInstrInfo.td @@ -149,12 +149,14 @@ def STDFQri : F3_2<3, 0b100110, "std $src, [$base+$offset]">; // Section B.9 - SETHI Instruction, p. 104 -def SETHIi: F2_1<0b100, "sethi">; +def SETHIi: F2_1<0b100, + (ops IntRegs:$dst, i32imm:$src), + "sethi $src, $dst">; // Section B.10 - NOP Instruction, p. 105 // (It's a special case of SETHI) let rd = 0, imm22 = 0 in - def NOP : F2_1<0b100, "nop">; + def NOP : F2_1<0b100, (ops), "nop">; // Section B.11 - Logical Instructions, p. 106 def ANDrr : F3_1<2, 0b000001, diff --git a/lib/Target/SparcV8/SparcV8InstrFormats.td b/lib/Target/SparcV8/SparcV8InstrFormats.td index e30edce83c7..d2ed82ebbad 100644 --- a/lib/Target/SparcV8/SparcV8InstrFormats.td +++ b/lib/Target/SparcV8/SparcV8InstrFormats.td @@ -21,11 +21,13 @@ class F2 : InstV8 { // Format 2 instructions // Specific F2 classes: SparcV8 manual, page 44 // -class F2_1 op2Val, string name> : F2 { +class F2_1 op2Val, dag ops, string asmstr> : F2 { bits<5> rd; + dag OperandList = ops; + let AsmString = asmstr; + let op2 = op2Val; - let Name = name; let Inst{29-25} = rd; } diff --git a/lib/Target/SparcV8/SparcV8InstrInfo.td b/lib/Target/SparcV8/SparcV8InstrInfo.td index 1f8349e11bd..ad5325dec62 100644 --- a/lib/Target/SparcV8/SparcV8InstrInfo.td +++ b/lib/Target/SparcV8/SparcV8InstrInfo.td @@ -149,12 +149,14 @@ def STDFQri : F3_2<3, 0b100110, "std $src, [$base+$offset]">; // Section B.9 - SETHI Instruction, p. 104 -def SETHIi: F2_1<0b100, "sethi">; +def SETHIi: F2_1<0b100, + (ops IntRegs:$dst, i32imm:$src), + "sethi $src, $dst">; // Section B.10 - NOP Instruction, p. 105 // (It's a special case of SETHI) let rd = 0, imm22 = 0 in - def NOP : F2_1<0b100, "nop">; + def NOP : F2_1<0b100, (ops), "nop">; // Section B.11 - Logical Instructions, p. 106 def ANDrr : F3_1<2, 0b000001,