From: Christian Konig Date: Sat, 16 Feb 2013 11:28:07 +0000 (+0000) Subject: R600/SI: fix VOPC encoding v2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3c3a7bfb0600097ec4fdf24b96015b1547d9401f;p=platform%2Fupstream%2Fllvm.git R600/SI: fix VOPC encoding v2 Previously it only worked because of coincident. v2: fix 64bit versions, use 0x80 (inline 0) instead of SGPR0 for the unused SRC2 This is a candidate for the stable branch. Signed-off-by: Christian König Reviewed-by: Tom Stellard llvm-svn: 175352 --- diff --git a/llvm/lib/Target/R600/SIInstrFormats.td b/llvm/lib/Target/R600/SIInstrFormats.td index 7040115..bd31bc1 100644 --- a/llvm/lib/Target/R600/SIInstrFormats.td +++ b/llvm/lib/Target/R600/SIInstrFormats.td @@ -21,26 +21,12 @@ // //===----------------------------------------------------------------------===// -class VOP3b_2IN op, string opName, RegisterClass dstClass, - RegisterClass src0Class, RegisterClass src1Class, - list pattern> - : VOP3b ; - - -class VOP3_1_32 op, string opName, list pattern> - : VOP3b_2IN ; - class VOP3_32 op, string opName, list pattern> : VOP3 ; class VOP3_64 op, string opName, list pattern> : VOP3 ; - class SOP1_32 op, string opName, list pattern> : SOP1 ; @@ -109,34 +95,27 @@ class SOPK_32 op, string opName, list pattern> class SOPK_64 op, string opName, list pattern> : SOPK ; -class VOPC_Helper op, RegisterClass vrc, RegisterClass arc, - string opName, list pattern> : - VOPC < - op, (ins arc:$src0, vrc:$src1), opName, pattern - >; - -multiclass VOPC_32 op, string opName, list pattern> { - - def _e32 : VOPC_Helper < - {op{7}, op{6}, op{5}, op{4}, op{3}, op{2}, op{1}, op{0}}, - VReg_32, AllReg_32, opName, pattern - >; +multiclass VOPC_Helper op, RegisterClass vrc, RegisterClass arc, + string opName, list pattern> { - def _e64 : VOP3_1_32 < - op, + def _e32 : VOPC ; + def _e64 : VOP3 < + {0, op{7}, op{6}, op{5}, op{4}, op{3}, op{2}, op{1}, op{0}}, + (outs SReg_1:$dst), + (ins arc:$src0, vrc:$src1, + InstFlag:$abs, InstFlag:$clamp, + InstFlag:$omod, InstFlag:$neg), opName, pattern - >; + > { + let SRC2 = 0x80; + } } -multiclass VOPC_64 op, string opName, list pattern> { +multiclass VOPC_32 op, string opName, list pattern> + : VOPC_Helper ; - def _e32 : VOPC_Helper ; - - def _e64 : VOP3_64 < - {0, op{7}, op{6}, op{5}, op{4}, op{3}, op{2}, op{1}, op{0}}, - opName, [] - >; -} +multiclass VOPC_64 op, string opName, list pattern> + : VOPC_Helper ; class SOPC_32 op, string opName, list pattern> : SOPC ;