diff options
author | Tony Wasserka <tony.wasserka@gmx.de> | 2021-07-13 11:22:46 +0200 |
---|---|---|
committer | Marge Bot <eric+marge@anholt.net> | 2021-07-13 17:43:26 +0000 |
commit | 66e51dc4747954b1dc3a3259b2a9ba86f6502a27 (patch) | |
tree | ea0bd3872c64b173e18b19bb255455ad87edd627 /src/amd/compiler/aco_assembler.cpp | |
parent | 76554419b3a3e73186842ca3e1bbf860de9532ed (diff) | |
download | mesa-66e51dc4747954b1dc3a3259b2a9ba86f6502a27.tar.gz |
aco: Remove use of deprecated Operand constructors
This migration was done with libclang-based automatic tooling, which
performed these replacements:
* Operand(uint8_t) -> Operand::c8
* Operand(uint16_t) -> Operand::c16
* Operand(uint32_t, false) -> Operand::c32
* Operand(uint32_t, bool) -> Operand::c32_or_c64
* Operand(uint64_t) -> Operand::c64
* Operand(0) -> Operand::zero(num_bytes)
Casts that were previously used for constructor selection have automatically
been removed (e.g. Operand((uint16_t)1) -> Operand::c16(1)).
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11653>
Diffstat (limited to 'src/amd/compiler/aco_assembler.cpp')
-rw-r--r-- | src/amd/compiler/aco_assembler.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/amd/compiler/aco_assembler.cpp b/src/amd/compiler/aco_assembler.cpp index 8631189b7bf..fd4916c5dee 100644 --- a/src/amd/compiler/aco_assembler.cpp +++ b/src/amd/compiler/aco_assembler.cpp @@ -98,7 +98,7 @@ emit_instruction(asm_context& ctx, std::vector<uint32_t>& out, Instruction* inst ctx.constaddrs[instr->operands[1].constantValue()].add_literal = out.size() + 1; instr->opcode = aco_opcode::s_add_u32; - instr->operands[1] = Operand(0u); + instr->operands[1] = Operand::zero(); instr->operands[1].setFixed(PhysReg(255)); } @@ -904,20 +904,20 @@ emit_long_jump(asm_context& ctx, SOPP_instruction* branch, bool backwards, instr.reset(bld.sop1(aco_opcode::s_getpc_b64, branch->definitions[0]).instr); emit_instruction(ctx, out, instr.get()); - instr.reset(bld.sop2(aco_opcode::s_addc_u32, def_tmp_lo, op_tmp_lo, Operand(0u)).instr); + instr.reset(bld.sop2(aco_opcode::s_addc_u32, def_tmp_lo, op_tmp_lo, Operand::zero()).instr); instr->operands[1].setFixed(PhysReg{255}); /* this operand has to be a literal */ emit_instruction(ctx, out, instr.get()); branch->pass_flags = out.size(); - instr.reset( - bld.sop2(aco_opcode::s_addc_u32, def_tmp_hi, op_tmp_hi, Operand(backwards ? UINT32_MAX : 0u)) - .instr); + instr.reset(bld.sop2(aco_opcode::s_addc_u32, def_tmp_hi, op_tmp_hi, + Operand::c32(backwards ? UINT32_MAX : 0u)) + .instr); emit_instruction(ctx, out, instr.get()); /* restore SCC and clear the LSB of the new PC */ - instr.reset(bld.sopc(aco_opcode::s_bitcmp1_b32, def_tmp_lo, op_tmp_lo, Operand(0u)).instr); + instr.reset(bld.sopc(aco_opcode::s_bitcmp1_b32, def_tmp_lo, op_tmp_lo, Operand::zero()).instr); emit_instruction(ctx, out, instr.get()); - instr.reset(bld.sop1(aco_opcode::s_bitset0_b32, def_tmp_lo, Operand(0u)).instr); + instr.reset(bld.sop1(aco_opcode::s_bitset0_b32, def_tmp_lo, Operand::zero()).instr); emit_instruction(ctx, out, instr.get()); /* create the s_setpc_b64 to jump */ |