mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-09 14:50:11 +01:00
nak: Allow SHF to use immediate encoding for shift
This is pretty common and avoid using a register for nothing in most cases. Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com> Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28819>
This commit is contained in:
parent
f008f6a33b
commit
fe1aa98ab9
2 changed files with 7 additions and 2 deletions
|
|
@ -3314,7 +3314,7 @@ pub struct OpShf {
|
|||
#[src_type(ALU)]
|
||||
pub high: Src,
|
||||
|
||||
#[src_type(GPR)]
|
||||
#[src_type(ALU)]
|
||||
pub shift: Src,
|
||||
|
||||
pub right: bool,
|
||||
|
|
|
|||
|
|
@ -691,7 +691,12 @@ fn legalize_sm70_instr(
|
|||
Op::PopC(_) => (),
|
||||
Op::Shf(op) => {
|
||||
copy_alu_src_if_not_reg(b, &mut op.low, SrcType::ALU);
|
||||
copy_alu_src_if_not_reg(b, &mut op.high, SrcType::ALU);
|
||||
copy_alu_src_if_both_not_reg(
|
||||
b,
|
||||
&op.shift,
|
||||
&mut op.high,
|
||||
SrcType::ALU,
|
||||
);
|
||||
}
|
||||
Op::F2F(_) | Op::F2I(_) | Op::I2F(_) | Op::Mov(_) | Op::FRnd(_) => (),
|
||||
Op::Prmt(op) => {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue