pco: add mappings for setl, savl ops

Ops to set/read the link register.

Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41833>
This commit is contained in:
Simon Perretta 2026-05-20 07:53:43 +01:00 committed by Marge Bot
parent 9ff341ff5f
commit 49c66a5c44
2 changed files with 46 additions and 0 deletions

View file

@ -1550,6 +1550,11 @@ encode_map(O_EMITPIX,
op_ref_maps=[('backend', [], ['s0', 's2'])]
)
encode_map(O_SETL,
encodings=[(I_SETL, [('ressel', 'w0')])],
op_ref_maps=[('backend', [], ['w0'])]
)
encode_map(O_BBYP0BM,
encodings=[
(I_PHASE0_SRC, [
@ -1822,6 +1827,11 @@ encode_map(O_MUTEX,
op_ref_maps=[('ctrl', [], ['imm'])]
)
encode_map(O_SAVL,
encodings=[(I_SAVL, [])],
op_ref_maps=[('ctrl', ['w0'], [])]
)
# Group mappings.
group_map(O_FADD,
hdr=(I_IGRP_HDR_MAIN, [
@ -3386,6 +3396,25 @@ group_map(O_EMITPIX,
]
)
group_map(O_SETL,
hdr=(I_IGRP_HDR_MAIN, [
('oporg', 'be'),
('olchk', False),
('w1p', False),
('w0p', False),
('cc', OM_EXEC_CND),
('end', False),
('atom', False),
('rpt', 1)
]),
enc_ops=[('backend', O_SETL)],
srcs=[('s[2]', ('backend', SRC(0)), 'w0')],
iss=[
('is[0]', 's2'),
('is[4]', 'fte')
]
)
group_map(O_MOVI32,
hdr=(I_IGRP_HDR_BITWISE, [
('opcnt', 'p0'),
@ -3793,3 +3822,16 @@ group_map(O_MUTEX,
]),
enc_ops=[('ctrl', O_MUTEX)]
)
group_map(O_SAVL,
hdr=(I_IGRP_HDR_CONTROL, [
('olchk', False),
('w1p', False),
('w0p', True),
('cc', OM_EXEC_CND),
('miscctl', False),
('ctrlop', 'savl')
]),
enc_ops=[('ctrl', O_SAVL)],
dests=[('w[0]', ('ctrl', DEST(0)), 'w0')]
)

View file

@ -429,6 +429,8 @@ O_SAVMSK = hw_op('savmsk', OM_ALU_RPT1 + [OM_SAVMSK_MODE], 2)
O_EMITPIX = hw_op('emitpix', OM_ALU_RPT1 + [OM_FREEP], 0, 2)
O_SETL = hw_op('setl', [OM_EXEC_CND], 0, 1)
## Bitwise.
O_MOVI32 = hw_op('movi32', OM_ALU, 1, 1)
@ -474,6 +476,8 @@ O_BR_NEXT = hw_op('br.next', [OM_EXEC_CND])
O_MUTEX = hw_op('mutex', [OM_MUTEX_OP], 0, 1)
O_SAVL = hw_op('savl', [OM_EXEC_CND], 1, 0)
# Combination (> 1 instructions per group).
O_SCMP = hw_op('scmp', OM_ALU + [OM_TST_OP_MAIN], 1, 2, [], [[RM_ABS, RM_NEG], [RM_ABS, RM_NEG]])
O_BCMP = hw_op('bcmp', OM_ALU + [OM_TST_OP_MAIN, OM_TST_TYPE_MAIN], 1, 2, [], [[RM_ABS, RM_NEG], [RM_ABS, RM_NEG]])