Fixing add_carry (+typos).

This commit is contained in:
Ben Vanik 2014-08-22 21:58:28 -07:00
parent ba5b626cdf
commit f6c73819a3
4 changed files with 9 additions and 5 deletions

View File

@ -317,8 +317,13 @@ int ConstantPropagationPass::Run(HIRBuilder* builder) {
} }
} }
} }
i->Replace(&OPCODE_ASSIGN_info, 0); if (i->dest->type == ca->type) {
i->set_src1(ca); i->Replace(&OPCODE_ASSIGN_info, 0);
i->set_src1(ca);
} else {
i->Replace(&OPCODE_ZERO_EXTEND_info, 0);
i->set_src1(ca);
}
} }
break; break;
case OPCODE_SUB: case OPCODE_SUB:

View File

@ -478,7 +478,7 @@ XEEMITTER(subfmex, 0x7C0001D0, XO)(PPCHIRBuilder& f, InstrData& i) {
XEEMITTER(subfzex, 0x7C000190, XO)(PPCHIRBuilder& f, InstrData& i) { XEEMITTER(subfzex, 0x7C000190, XO)(PPCHIRBuilder& f, InstrData& i) {
// RT <- ¬(RA) + CA // RT <- ¬(RA) + CA
Value* v = f.AddWithCarry(f.Not(f.LoadGPR(i.XO.RA)), f.LoadZero(INT64_TYPE), Value* v = f.AddWithCarry(f.Not(f.LoadGPR(i.XO.RA)), f.LoadZero(INT64_TYPE),
f.LoadCA()); f.LoadCA(), ARITHMETIC_SET_CARRY);
if (i.XO.OE) { if (i.XO.OE) {
assert_always(); assert_always();
// e.update_xer_with_overflow_and_carry(b.CreateExtractValue(v, 1)); // e.update_xer_with_overflow_and_carry(b.CreateExtractValue(v, 1));

View File

@ -138,4 +138,3 @@ bool D3D11Window::OnResize(uint32_t width, uint32_t height) {
return true; return true;
} }

View File

@ -341,7 +341,7 @@ SHIM_CALL RtlNtStatusToDosError_shim(PPCContext* ppc_state,
} }
// TODO(benvanik): implement lookup table. // TODO(benvanik): implement lookup table.
XELOGE("RtlNtStatusToDosError lookup NOT SHIMEMENTED"); XELOGE("RtlNtStatusToDosError lookup NOT IMPLEMENTED");
uint32_t result = 317; // ERROR_MR_MID_NOT_FOUND uint32_t result = 317; // ERROR_MR_MID_NOT_FOUND