From ab162f80c302307ca331c0182702162ad0e4e9be Mon Sep 17 00:00:00 2001 From: =?utf8?q?Michel=20D=C3=A4nzer?= Date: Wed, 29 Aug 2012 18:52:53 +0200 Subject: [PATCH] radeon/llvm: Extend SI EXEC register support. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Add 32 bit lo and hi variants, and binary encodings. Signed-off-by: Michel Dänzer Reviewed-by: Tom Stellard --- src/gallium/drivers/radeon/MCTargetDesc/SIMCCodeEmitter.cpp | 3 +++ src/gallium/drivers/radeon/SIGenRegisterInfo.pl | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/radeon/MCTargetDesc/SIMCCodeEmitter.cpp b/src/gallium/drivers/radeon/MCTargetDesc/SIMCCodeEmitter.cpp index c2b5e47bbbe..438d2acf989 100644 --- a/src/gallium/drivers/radeon/MCTargetDesc/SIMCCodeEmitter.cpp +++ b/src/gallium/drivers/radeon/MCTargetDesc/SIMCCodeEmitter.cpp @@ -281,6 +281,9 @@ unsigned SIMCCodeEmitter::getEncodingBytes(const MCInst &MI) const { unsigned SIMCCodeEmitter::getRegBinaryCode(unsigned reg) const { switch (reg) { case AMDGPU::M0: return 124; + case AMDGPU::EXEC: return 126; + case AMDGPU::EXEC_LO: return 126; + case AMDGPU::EXEC_HI: return 127; case AMDGPU::SREG_LIT_0: return 128; case AMDGPU::SI_LITERAL_CONSTANT: return 255; default: return getHWRegNum(reg); diff --git a/src/gallium/drivers/radeon/SIGenRegisterInfo.pl b/src/gallium/drivers/radeon/SIGenRegisterInfo.pl index e47fb56868e..3813eb5ad12 100644 --- a/src/gallium/drivers/radeon/SIGenRegisterInfo.pl +++ b/src/gallium/drivers/radeon/SIGenRegisterInfo.pl @@ -88,7 +88,9 @@ class SGPR_256 num, string name, list subregs> : SI_256 ; def VCC : SIReg<"VCC">; -def EXEC : SIReg<"EXEC">; +def EXEC_LO : SIReg<"EXEC LO">; +def EXEC_HI : SIReg<"EXEC HI">; +def EXEC : SI_64<"EXEC", [EXEC_LO,EXEC_HI]>; def SCC : SIReg<"SCC">; def SREG_LIT_0 : SIReg <"S LIT 0">; def SI_LITERAL_CONSTANT : SIReg<"LITERAL CONSTANT">; @@ -141,7 +143,7 @@ for (my $i = 0; $i < $VGPR_COUNT; $i++) { print <; def VReg_32 : RegisterClass<"AMDGPU", [f32, i32], 32, -- 2.30.2