diff options
author | Tom Stellard <[email protected]> | 2012-09-24 16:49:43 -0400 |
---|---|---|
committer | Tom Stellard <[email protected]> | 2012-09-24 17:01:31 -0400 |
commit | 92b033a89ebd46d640ecb2592159087a87e5516e (patch) | |
tree | 92f373c1ff508ae11170c769b830d804be7996ad /src/gallium/drivers/radeon/MCTargetDesc/R600MCCodeEmitter.cpp | |
parent | 24a8e0c3da65019073f89cb7248916a692707db6 (diff) |
radeon/llvm: Fix instruction encoding for r600 family GPUs
Tested-by: Michel Dänzer <[email protected]>
https://bugs.freedesktop.org/show_bug.cgi?id=55217
Diffstat (limited to 'src/gallium/drivers/radeon/MCTargetDesc/R600MCCodeEmitter.cpp')
-rw-r--r-- | src/gallium/drivers/radeon/MCTargetDesc/R600MCCodeEmitter.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/drivers/radeon/MCTargetDesc/R600MCCodeEmitter.cpp b/src/gallium/drivers/radeon/MCTargetDesc/R600MCCodeEmitter.cpp index 847fcb62d4e..a11f48234cb 100644 --- a/src/gallium/drivers/radeon/MCTargetDesc/R600MCCodeEmitter.cpp +++ b/src/gallium/drivers/radeon/MCTargetDesc/R600MCCodeEmitter.cpp @@ -218,8 +218,8 @@ void R600MCCodeEmitter::EmitALUInstr(const MCInst &MI, //older alu have different encoding for instructions with one or two src //parameters. - if (STI.getFeatureBits() & AMDGPU::FeatureR600ALUInst && - MI.getNumOperands() < 4) { + if ((STI.getFeatureBits() & AMDGPU::FeatureR600ALUInst) && + !(MCDesc.TSFlags & R600_InstFlag::OP3)) { uint64_t ISAOpCode = InstWord01 & (0x3FFULL << 39); InstWord01 &= ~(0x3FFULL << 39); InstWord01 |= ISAOpCode << 1; |