mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-13 22:04:09 +02:00
Fixed i8 mul issue with no mResult
This commit is contained in:
parent
92ccadce1e
commit
aea367b95e
1 changed files with 5 additions and 7 deletions
|
@ -9340,8 +9340,6 @@ bool BeMCContext::DoLegalization()
|
||||||
{
|
{
|
||||||
if ((!arg0.IsNativeReg()) || (arg0.mReg != X64Reg_AL) || (inst->mResult))
|
if ((!arg0.IsNativeReg()) || (arg0.mReg != X64Reg_AL) || (inst->mResult))
|
||||||
{
|
{
|
||||||
BF_ASSERT(inst->mResult);
|
|
||||||
|
|
||||||
auto srcVRegInfo = GetVRegInfo(inst->mArg0);
|
auto srcVRegInfo = GetVRegInfo(inst->mArg0);
|
||||||
// Int8 multiplies can only be done on AL
|
// Int8 multiplies can only be done on AL
|
||||||
AllocInst(BeMCInstKind_PreserveVolatiles, BeMCOperand::FromReg(X64Reg_RAX), instIdx++);
|
AllocInst(BeMCInstKind_PreserveVolatiles, BeMCOperand::FromReg(X64Reg_RAX), instIdx++);
|
||||||
|
@ -9355,7 +9353,7 @@ bool BeMCContext::DoLegalization()
|
||||||
|
|
||||||
AllocInst(BeMCInstKind_Mov, BeMCOperand::FromReg(X64Reg_AH), inst->mArg1, instIdx++);
|
AllocInst(BeMCInstKind_Mov, BeMCOperand::FromReg(X64Reg_AH), inst->mArg1, instIdx++);
|
||||||
AllocInst(BeMCInstKind_Mov, BeMCOperand::FromReg(X64Reg_AL), inst->mArg0, instIdx++);
|
AllocInst(BeMCInstKind_Mov, BeMCOperand::FromReg(X64Reg_AL), inst->mArg0, instIdx++);
|
||||||
AllocInst(BeMCInstKind_Mov, inst->mResult, BeMCOperand::FromReg(X64Reg_AL), instIdx++ + 1);
|
AllocInst(BeMCInstKind_Mov, inst->mResult ? inst->mResult : inst->mArg0, BeMCOperand::FromReg(X64Reg_AL), instIdx++ + 1);
|
||||||
inst->mArg0 = BeMCOperand::FromReg(X64Reg_AL);
|
inst->mArg0 = BeMCOperand::FromReg(X64Reg_AL);
|
||||||
inst->mArg1 = BeMCOperand::FromReg(X64Reg_AH);
|
inst->mArg1 = BeMCOperand::FromReg(X64Reg_AH);
|
||||||
inst->mResult = BeMCOperand();
|
inst->mResult = BeMCOperand();
|
||||||
|
@ -14769,7 +14767,7 @@ void BeMCContext::Generate(BeFunction* function)
|
||||||
mDbgPreferredRegs[32] = X64Reg_R8;*/
|
mDbgPreferredRegs[32] = X64Reg_R8;*/
|
||||||
|
|
||||||
//mDbgPreferredRegs[8] = X64Reg_RAX;
|
//mDbgPreferredRegs[8] = X64Reg_RAX;
|
||||||
//mDebugging = function->mName == "?DrawBox@Graphics@gfx@Beefy@bf@@QEAAXPEAVImage@234@MMMM@Z";
|
//mDebugging = function->mName == "?BytesToPixels@Sprite@Strawberry@bf@@AEAAXPEAV?$Array1@E@System@3@PEAV?$Array1@UColor@Strawberry@bf@@@53@W4Modes@123@1@Z";
|
||||||
//"?ColorizeCodeString@IDEUtils@IDE@bf@@SAXPEAVString@System@3@W4CodeKind@123@@Z";
|
//"?ColorizeCodeString@IDEUtils@IDE@bf@@SAXPEAVString@System@3@W4CodeKind@123@@Z";
|
||||||
//"?Main@Program@bf@@CAHPEAV?$Array1@PEAVString@System@bf@@@System@2@@Z";
|
//"?Main@Program@bf@@CAHPEAV?$Array1@PEAVString@System@bf@@@System@2@@Z";
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue