diff options
Diffstat (limited to 'src/gallium/drivers/nv50/nv50_pc_emit.c')
-rw-r--r-- | src/gallium/drivers/nv50/nv50_pc_emit.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/gallium/drivers/nv50/nv50_pc_emit.c b/src/gallium/drivers/nv50/nv50_pc_emit.c index 3a3b277c13..b5f4383aa1 100644 --- a/src/gallium/drivers/nv50/nv50_pc_emit.c +++ b/src/gallium/drivers/nv50/nv50_pc_emit.c @@ -748,8 +748,30 @@ emit_bitop2(struct nv_pc *pc, struct nv_instruction *i) } static void +emit_arl(struct nv_pc *pc, struct nv_instruction *i) +{ + assert(SFILE(i, 0) == NV_FILE_GPR); + assert(SFILE(i, 1) == NV_FILE_IMM); + + assert(!i->flags_def); + + pc->emit[0] = 0x00000001; + pc->emit[1] = 0xc0000000; + + set_dst(pc, i->def[0]); + set_pred(pc, i); + set_src_0(pc, i->src[0]); + pc->emit[0] |= (get_immd_u32(i->src[1]) & 0x3f) << 16; +} + +static void emit_shift(struct nv_pc *pc, struct nv_instruction *i) { + if (DFILE(i, 0) == NV_FILE_ADDR) { + emit_arl(pc, i); + return; + } + pc->emit[0] = 0x30000001; pc->emit[1] = 0xc4000000; |