slwx, ignoring twi.

This commit is contained in:
Ben Vanik 2013-05-25 01:31:38 -07:00
parent ed401449b7
commit 07d0dd98b6
2 changed files with 7 additions and 6 deletions

View File

@ -967,7 +967,6 @@ XEEMITTER(sldx, 0x7C000036, X )(X64Emitter& e, X86Compiler& c, InstrDat
return 1; return 1;
} }
#if 0
XEEMITTER(slwx, 0x7C000030, X )(X64Emitter& e, X86Compiler& c, InstrData& i) { XEEMITTER(slwx, 0x7C000030, X )(X64Emitter& e, X86Compiler& c, InstrData& i) {
// n <- (RB)[59:63] // n <- (RB)[59:63]
// r <- ROTL32((RS)[32:63], n) // r <- ROTL32((RS)[32:63], n)
@ -977,8 +976,10 @@ XEEMITTER(slwx, 0x7C000030, X )(X64Emitter& e, X86Compiler& c, InstrDat
// m <- i64.0 // m <- i64.0
// RA <- r & m // RA <- r & m
jit_value_t v = jit_insn_shl(f, e.gpr_value(i.X.RT), e.gpr_value(i.X.RB)); GpVar v(c.newGpVar());
v = jit_insn_and(f, v, e.get_uint64(UINT32_MAX)); c.mov(v, e.gpr_value(i.X.RT));
c.shl(v, e.gpr_value(i.X.RB));
c.mov(v.r32(), v.r32());
e.update_gpr_value(i.X.RA, v); e.update_gpr_value(i.X.RA, v);
if (i.X.Rc) { if (i.X.Rc) {
@ -988,7 +989,6 @@ XEEMITTER(slwx, 0x7C000030, X )(X64Emitter& e, X86Compiler& c, InstrDat
return 0; return 0;
} }
#endif
XEEMITTER(sradx, 0x7C000634, X )(X64Emitter& e, X86Compiler& c, InstrData& i) { XEEMITTER(sradx, 0x7C000634, X )(X64Emitter& e, X86Compiler& c, InstrData& i) {
XEINSTRNOTIMPLEMENTED(); XEINSTRNOTIMPLEMENTED();
@ -1116,7 +1116,7 @@ void X64RegisterEmitCategoryALU() {
XEREGISTERINSTR(rlwinmx, 0x54000000); XEREGISTERINSTR(rlwinmx, 0x54000000);
XEREGISTERINSTR(rlwnmx, 0x5C000000); XEREGISTERINSTR(rlwnmx, 0x5C000000);
XEREGISTERINSTR(sldx, 0x7C000036); XEREGISTERINSTR(sldx, 0x7C000036);
// XEREGISTERINSTR(slwx, 0x7C000030); XEREGISTERINSTR(slwx, 0x7C000030);
XEREGISTERINSTR(sradx, 0x7C000634); XEREGISTERINSTR(sradx, 0x7C000634);
XEREGISTERINSTR(sradix, 0x7C000674); XEREGISTERINSTR(sradix, 0x7C000674);
XEREGISTERINSTR(srawx, 0x7C000630); XEREGISTERINSTR(srawx, 0x7C000630);

View File

@ -469,8 +469,9 @@ int XeEmitTrap(X64Emitter& e, X86Compiler& c, InstrData& i,
return 0; return 0;
} }
XELOGCPU("twi not implemented - instruction ignored");
// TODO(benvanik): port from LLVM // TODO(benvanik): port from LLVM
XEASSERTALWAYS();
// BasicBlock* after_bb = BasicBlock::Create(*e.context(), "", e.fn(), // BasicBlock* after_bb = BasicBlock::Create(*e.context(), "", e.fn(),
// e.GetNextBasicBlock()); // e.GetNextBasicBlock());