panfrost: Rename CS ADD_IMMEDIATEXX to ADD_IMMXX

This is required map more closely to newer generation definition and avoid
needless PAN_ARCH blocks.

As the opcode is actually named ADD_IMMEDIATEXX on v12 and lower, this
wasn't changed.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33736>
This commit is contained in:
Mary Guillemard
2025-01-30 11:56:15 +00:00
committed by Marge Bot
parent e970d440a2
commit 3aa1687829
3 changed files with 12 additions and 12 deletions
+2 -2
View File
@@ -1253,7 +1253,7 @@ static inline void
cs_add32(struct cs_builder *b, struct cs_index dest, struct cs_index src,
unsigned imm)
{
cs_emit(b, ADD_IMMEDIATE32, I) {
cs_emit(b, ADD_IMM32, I) {
I.destination = cs_dst32(b, dest);
I.source = cs_src32(b, src);
I.immediate = imm;
@@ -1264,7 +1264,7 @@ static inline void
cs_add64(struct cs_builder *b, struct cs_index dest, struct cs_index src,
unsigned imm)
{
cs_emit(b, ADD_IMMEDIATE64, I) {
cs_emit(b, ADD_IMM64, I) {
I.destination = cs_dst64(b, dest);
I.source = cs_src64(b, src);
I.immediate = imm;
+8 -8
View File
@@ -204,7 +204,7 @@ print_cs_instr(FILE *fp, const uint64_t *instr)
}
case MALI_CS_OPCODE_ADD_IMMEDIATE32: {
cs_unpack(instr, CS_ADD_IMMEDIATE32, I);
cs_unpack(instr, CS_ADD_IMM32, I);
fprintf(fp, "ADD_IMMEDIATE32 r%u, r%u, #%d", I.destination, I.source,
I.immediate);
@@ -212,7 +212,7 @@ print_cs_instr(FILE *fp, const uint64_t *instr)
}
case MALI_CS_OPCODE_ADD_IMMEDIATE64: {
cs_unpack(instr, CS_ADD_IMMEDIATE64, I);
cs_unpack(instr, CS_ADD_IMM64, I);
fprintf(fp, "ADD_IMMEDIATE64 d%u, d%u, #%d", I.destination, I.source,
I.immediate);
@@ -972,14 +972,14 @@ interpret_cs_instr(struct pandecode_context *ctx, struct queue_ctx *qctx)
}
case MALI_CS_OPCODE_ADD_IMMEDIATE32: {
cs_unpack(bytes, CS_ADD_IMMEDIATE32, I);
cs_unpack(bytes, CS_ADD_IMM32, I);
qctx->regs[I.destination] = qctx->regs[I.source] + I.immediate;
break;
}
case MALI_CS_OPCODE_ADD_IMMEDIATE64: {
cs_unpack(bytes, CS_ADD_IMMEDIATE64, I);
cs_unpack(bytes, CS_ADD_IMM64, I);
int64_t value =
(qctx->regs[I.source] | ((int64_t)qctx->regs[I.source + 1] << 32)) +
@@ -1201,13 +1201,13 @@ record_indirect_branch_target(struct cs_code_cfg *cfg,
}
case MALI_CS_OPCODE_ADD_IMMEDIATE32: {
cs_unpack(instr, CS_ADD_IMMEDIATE32, I);
cs_unpack(instr, CS_ADD_IMM32, I);
reg_file.u32[I.destination] = reg_file.u32[I.source] + I.immediate;
break;
}
case MALI_CS_OPCODE_ADD_IMMEDIATE64: {
cs_unpack(instr, CS_ADD_IMMEDIATE64, I);
cs_unpack(instr, CS_ADD_IMM64, I);
assert(I.destination % 2 == 0 &&
"Destination register should be aligned to 2");
@@ -1275,7 +1275,7 @@ collect_indirect_branch_targets_recurse(struct cs_code_cfg *cfg,
}
case MALI_CS_OPCODE_ADD_IMMEDIATE32: {
cs_unpack(instr, CS_ADD_IMMEDIATE32, I);
cs_unpack(instr, CS_ADD_IMM32, I);
if (BITSET_TEST(track_map, I.destination)) {
BITSET_SET(track_map, I.source);
BITSET_CLEAR(track_map, I.destination);
@@ -1284,7 +1284,7 @@ collect_indirect_branch_targets_recurse(struct cs_code_cfg *cfg,
}
case MALI_CS_OPCODE_ADD_IMMEDIATE64: {
cs_unpack(instr, CS_ADD_IMMEDIATE64, I);
cs_unpack(instr, CS_ADD_IMM64, I);
if (BITSET_TEST(track_map, I.destination)) {
BITSET_SET(track_map, I.source);
BITSET_CLEAR(track_map, I.destination);
+2 -2
View File
@@ -632,14 +632,14 @@
<field name="Opcode" size="8" start="56" type="CS Opcode" default="FINISH_FRAGMENT"/>
</struct>
<struct name="CS ADD_IMMEDIATE32" size="2">
<struct name="CS ADD_IMM32" size="2">
<field name="Immediate" size="32" start="0" type="int"/>
<field name="Source" size="8" start="40" type="uint"/>
<field name="Destination" size="8" start="48" type="uint"/>
<field name="Opcode" size="8" start="56" type="CS Opcode" default="ADD_IMMEDIATE32"/>
</struct>
<struct name="CS ADD_IMMEDIATE64" size="2">
<struct name="CS ADD_IMM64" size="2">
<field name="Immediate" size="32" start="0" type="int"/>
<field name="Source" size="8" start="40" type="uint"/>
<field name="Destination" size="8" start="48" type="uint"/>