mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-05 19:50:12 +01:00
nir: add ilea_agx/ulea_agx opcodes
to facilitate address mode lowering. Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Reviewed-by: Karol Herbst <kherbst@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31964>
This commit is contained in:
parent
23afe968ad
commit
9ab8d70fa6
1 changed files with 7 additions and 0 deletions
|
|
@ -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: <data, end offset, bounds>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue