diff --git a/src/compiler/nir/nir_opcodes.py b/src/compiler/nir/nir_opcodes.py index 372728c9f92..564ab540e59 100644 --- a/src/compiler/nir/nir_opcodes.py +++ b/src/compiler/nir/nir_opcodes.py @@ -1347,6 +1347,13 @@ opcode("imadshl_agx", 0, tint, [0, 0, 0, 0], [tint, tint, tint, tint], False, opcode("imsubshl_agx", 0, tint, [0, 0, 0, 0], [tint, tint, tint, tint], False, "", f"(src0 * src1) - (src2 << src3)") +# Address arithmetic instructions: extend, shift, and add +# Shift must be a small constant. +opcode("ilea_agx", 0, tuint64, [0, 0, 0], [tuint64, tint32, tuint32], False, + "", f"src0 + (((int64_t)src1) << src2)") +opcode("ulea_agx", 0, tuint64, [0, 0, 0], [tuint64, tuint32, tuint32], False, + "", f"src0 + (((uint64_t)src1) << src2)") + # Bounds check instruction. # # Sources: