From: Tom Stellard Date: Wed, 25 Jul 2012 12:33:34 +0000 (-0400) Subject: radeon/llvm: Fix CCReg definitions on SI X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=bdda1cb914a291f42cb2221b42e922f22dccb777;p=mesa.git radeon/llvm: Fix CCReg definitions on SI --- diff --git a/src/gallium/drivers/radeon/SIGenRegisterInfo.pl b/src/gallium/drivers/radeon/SIGenRegisterInfo.pl index 68b4fe357fa..110c04f22fd 100644 --- a/src/gallium/drivers/radeon/SIGenRegisterInfo.pl +++ b/src/gallium/drivers/radeon/SIGenRegisterInfo.pl @@ -167,7 +167,8 @@ def AllReg_32 : RegisterClass<"AMDGPU", [f32, i32], 32, (add VReg_32, SReg_32) >; -def CCReg : RegisterClass<"AMDGPU", [f32], 32, (add VCC, SCC)>; +def SCCReg : RegisterClass<"AMDGPU", [i1], 1, (add SCC)>; +def VCCReg : RegisterClass<"AMDGPU", [i1], 1, (add VCC)>; STRING @@ -264,6 +265,12 @@ sub print_reg_class { print "def $reg_name : $reg_prefix\_$reg_width <$i, \"$reg_name\", [ ", join(',', @sub_regs) , "]>;\n"; push (@registers, $reg_name); } + + #Add VCC to SReg_64 + if ($class_prefix eq 'SReg' and $reg_width == 64) { + push (@registers, 'VCC') + } + my $reg_list = join(', ', @registers); print "def $class_prefix\_$reg_width : RegisterClass<\"AMDGPU\", [" . join (', ', @types) . "], $reg_width,\n (add $reg_list)\n>{\n"; diff --git a/src/gallium/drivers/radeon/SIInstrFormats.td b/src/gallium/drivers/radeon/SIInstrFormats.td index ac8465cdf52..79f47087ce7 100644 --- a/src/gallium/drivers/radeon/SIInstrFormats.td +++ b/src/gallium/drivers/radeon/SIInstrFormats.td @@ -121,8 +121,8 @@ multiclass VOPC_64 op, string opName, list pattern> { } class SOPC_32 op, string opName, list pattern> - : SOPC ; + : SOPC ; class SOPC_64 op, string opName, list pattern> - : SOPC ; + : SOPC ;