aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRhys Perry <[email protected]>2019-11-27 17:06:10 +0000
committerRhys Perry <[email protected]>2019-11-29 17:46:01 +0000
commit082e3a68fada731757ee06d1afdfa2cf654a0ad9 (patch)
treed7e51a9dde83587d55b78d295c7ae37187d86e3d /src
parentf1381e6715336fc9cf769eb591bf742659dfa9ec (diff)
aco: fix assembly of FLAT/GLOBAL atomics
They can take both a definition and data operand Signed-off-by: Rhys Perry <[email protected]> Reviewed-by: Daniel Schürmann <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/amd/compiler/aco_assembler.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/amd/compiler/aco_assembler.cpp b/src/amd/compiler/aco_assembler.cpp
index 4b70b2c0ac7..c9b5ca10684 100644
--- a/src/amd/compiler/aco_assembler.cpp
+++ b/src/amd/compiler/aco_assembler.cpp
@@ -425,7 +425,7 @@ void emit_instruction(asm_context& ctx, std::vector<uint32_t>& out, Instruction*
encoding = (0xFF & instr->operands[0].physReg());
if (!instr->definitions.empty())
encoding |= (0xFF & instr->definitions[0].physReg()) << 24;
- else
+ if (instr->operands.size() >= 3)
encoding |= (0xFF & instr->operands[2].physReg()) << 8;
if (!instr->operands[1].isUndefined()) {
assert(ctx.chip_class >= GFX10 || instr->operands[1].physReg() != 0x7F);