mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-22 17:50:12 +01:00
nv50/ir/gk110: use shl/shr instead of lshf/rshf so that c[] is supported
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
This commit is contained in:
parent
34bf5e27c6
commit
b56e50b8af
1 changed files with 6 additions and 17 deletions
|
|
@ -695,27 +695,16 @@ CodeEmitterGK110::emitINSBF(const Instruction *i)
|
||||||
void
|
void
|
||||||
CodeEmitterGK110::emitShift(const Instruction *i)
|
CodeEmitterGK110::emitShift(const Instruction *i)
|
||||||
{
|
{
|
||||||
const bool sar = i->op == OP_SHR && isSignedType(i->sType);
|
|
||||||
|
|
||||||
if (sar) {
|
|
||||||
emitForm_21(i, 0x214, 0x014);
|
|
||||||
code[1] |= 1 << 19;
|
|
||||||
} else
|
|
||||||
if (i->op == OP_SHR) {
|
if (i->op == OP_SHR) {
|
||||||
// this is actually RSHF
|
emitForm_21(i, 0x214, 0xc14);
|
||||||
emitForm_21(i, 0x27c, 0x87c);
|
if (isSignedType(i->dType))
|
||||||
code[1] |= GK110_GPR_ZERO << 10;
|
code[1] |= 1 << 19;
|
||||||
} else {
|
} else {
|
||||||
// this is actually LSHF
|
emitForm_21(i, 0x224, 0xc24);
|
||||||
emitForm_21(i, 0x1fc, 0xb7c);
|
|
||||||
code[1] |= GK110_GPR_ZERO << 10;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (i->subOp == NV50_IR_SUBOP_SHIFT_WRAP) {
|
if (i->subOp == NV50_IR_SUBOP_SHIFT_WRAP)
|
||||||
if (!sar)
|
code[1] |= 1 << 10;
|
||||||
code[1] |= 1 << 21;
|
|
||||||
// XXX: find wrap modifier for SHR S32
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue