Commit d1941da9 authored by Flyinghead's avatar Flyinghead
Browse files

arm64: fix xtrct dynarec implementation

Fixes Speed Devils issues
parent 096b4a27
......@@ -900,8 +900,19 @@ public:
case shop_xtrct:
{
const Register rd = regalloc.MapRegister(op.rd);
Lsr(rd, regalloc.MapRegister(op.rs1), 16);
Lsl(w0, regalloc.MapRegister(op.rs2), 16);
const Register rs1 = regalloc.MapRegister(op.rs1);
const Register rs2 = regalloc.MapRegister(op.rs2);
if (op.rs1._reg == op.rd._reg)
{
verify(op.rs2._reg != op.rd._reg);
Lsr(rd, rs1, 16);
Lsl(w0, rs2, 16);
}
else
{
Lsl(rd, rs2, 16);
Lsr(w0, rs1, 16);
}
Orr(rd, rd, w0);
}
break;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment