From: Michel Dänzer Date: Wed, 29 Aug 2012 16:52:53 +0000 (+0200) Subject: radeon/llvm: Extend SI EXEC register support. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ab162f80c302307ca331c0182702162ad0e4e9be;p=mesa.git radeon/llvm: Extend SI EXEC register support. Add 32 bit lo and hi variants, and binary encodings. Signed-off-by: Michel Dänzer Reviewed-by: Tom Stellard --- 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,