From bdda1cb914a291f42cb2221b42e922f22dccb777 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Wed, 25 Jul 2012 08:33:34 -0400 Subject: [PATCH] radeon/llvm: Fix CCReg definitions on SI --- src/gallium/drivers/radeon/SIGenRegisterInfo.pl | 9 ++++++++- src/gallium/drivers/radeon/SIInstrFormats.td | 4 ++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/gallium/drivers/radeon/SIGenRegisterInfo.pl b/src/gallium/drivers/radeon/SIGenRegisterInfo.pl index 68b4fe3..110c04f 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 ac8465c..79f4708 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 ; -- 2.7.4