diff options
author | Tom Stellard <thomas.stellard@amd.com> | 2013-06-28 15:46:53 +0000 |
---|---|---|
committer | Tom Stellard <thomas.stellard@amd.com> | 2013-06-28 15:46:53 +0000 |
commit | 5eb903d9c5c7bfc413f1f925c7c396dbcf932d33 (patch) | |
tree | 16edb37d3f9cb39c8a5fd0e637f2f5155951badf /llvm | |
parent | 1151031eb7e470ee87a802a1c5bdcee1385eaacb (diff) | |
download | bcm5719-llvm-5eb903d9c5c7bfc413f1f925c7c396dbcf932d33.tar.gz bcm5719-llvm-5eb903d9c5c7bfc413f1f925c7c396dbcf932d33.zip |
R600: Add ALUInst bit to tablegen definitions v2
v2:
- Remove functions left over from a previous rebase.
Reviewed-by: Vincent Lejeune<vljn at ovi.com>
llvm-svn: 185160
Diffstat (limited to 'llvm')
-rw-r--r-- | llvm/lib/Target/R600/R600Defines.h | 3 | ||||
-rw-r--r-- | llvm/lib/Target/R600/R600InstrFormats.td | 2 | ||||
-rw-r--r-- | llvm/lib/Target/R600/R600InstrInfo.cpp | 4 | ||||
-rw-r--r-- | llvm/lib/Target/R600/R600Instructions.td | 3 |
4 files changed, 8 insertions, 4 deletions
diff --git a/llvm/lib/Target/R600/R600Defines.h b/llvm/lib/Target/R600/R600Defines.h index e30ea27daa9..6bcf8aefa74 100644 --- a/llvm/lib/Target/R600/R600Defines.h +++ b/llvm/lib/Target/R600/R600Defines.h @@ -41,7 +41,8 @@ namespace R600_InstFlag { OP1 = (1 << 10), OP2 = (1 << 11), VTX_INST = (1 << 12), - TEX_INST = (1 << 13) + TEX_INST = (1 << 13), + ALU_INST = (1 << 14) }; } diff --git a/llvm/lib/Target/R600/R600InstrFormats.td b/llvm/lib/Target/R600/R600InstrFormats.td index d31f18cb47b..2c98fb90db5 100644 --- a/llvm/lib/Target/R600/R600InstrFormats.td +++ b/llvm/lib/Target/R600/R600InstrFormats.td @@ -26,6 +26,7 @@ class InstR600 <dag outs, dag ins, string asm, list<dag> pattern, bit HasNativeOperands = 0; bit VTXInst = 0; bit TEXInst = 0; + bit ALUInst = 0; let Namespace = "AMDGPU"; let OutOperandList = outs; @@ -47,6 +48,7 @@ class InstR600 <dag outs, dag ins, string asm, list<dag> pattern, let TSFlags{11} = Op2; let TSFlags{12} = VTXInst; let TSFlags{13} = TEXInst; + let TSFlags{14} = ALUInst; } //===----------------------------------------------------------------------===// diff --git a/llvm/lib/Target/R600/R600InstrInfo.cpp b/llvm/lib/Target/R600/R600InstrInfo.cpp index d17425f4c9a..f267ee92cd9 100644 --- a/llvm/lib/Target/R600/R600InstrInfo.cpp +++ b/llvm/lib/Target/R600/R600InstrInfo.cpp @@ -133,9 +133,7 @@ bool R600InstrInfo::isCubeOp(unsigned Opcode) const { bool R600InstrInfo::isALUInstr(unsigned Opcode) const { unsigned TargetFlags = get(Opcode).TSFlags; - return ((TargetFlags & R600_InstFlag::OP1) | - (TargetFlags & R600_InstFlag::OP2) | - (TargetFlags & R600_InstFlag::OP3)); + return (TargetFlags & R600_InstFlag::ALU_INST); } bool R600InstrInfo::isTransOnly(unsigned Opcode) const { diff --git a/llvm/lib/Target/R600/R600Instructions.td b/llvm/lib/Target/R600/R600Instructions.td index d819d44abf9..b0a82ff628c 100644 --- a/llvm/lib/Target/R600/R600Instructions.td +++ b/llvm/lib/Target/R600/R600Instructions.td @@ -114,6 +114,7 @@ class R600_1OP <bits<11> inst, string opName, list<dag> pattern, let update_pred = 0; let HasNativeOperands = 1; let Op1 = 1; + let ALUInst = 1; let DisableEncoding = "$literal"; let UseNamedOperandTable = 1; @@ -151,6 +152,7 @@ class R600_2OP <bits<11> inst, string opName, list<dag> pattern, let HasNativeOperands = 1; let Op2 = 1; + let ALUInst = 1; let DisableEncoding = "$literal"; let UseNamedOperandTable = 1; @@ -193,6 +195,7 @@ class R600_3OP <bits<5> inst, string opName, list<dag> pattern, let DisableEncoding = "$literal"; let Op3 = 1; let UseNamedOperandTable = 1; + let ALUInst = 1; let Inst{31-0} = Word0; let Inst{63-32} = Word1; |