Added new runtime sub bcasta/bcastax/bcasteax opposing to bnega/bnegax/bnegeax.

This commit is contained in:
acqn
2020-09-05 11:28:38 +08:00
committed by Oliver Schmidt
parent 142b0bf9b3
commit fe3f267233
5 changed files with 48 additions and 1 deletions

View File

@@ -851,7 +851,9 @@ void CE_GenRegInfo (CodeEntry* E, RegContents* InputRegs)
if ((In->RegA & 0x0F) >= 8) {
Out->RegA = 0;
}
} else if (FindBoolCmpCond (E->Arg) != CMP_INV ||
} else if (strcmp (E->Arg, "bcastax") == 0 ||
strcmp (E->Arg, "bnegax") == 0 ||
FindBoolCmpCond (E->Arg) != CMP_INV ||
FindTosCmpCond (E->Arg) != CMP_INV) {
/* Result is boolean value, so X is zero on output */
Out->RegX = 0;

View File

@@ -107,6 +107,9 @@ static const FuncInfo FuncInfoTable[] = {
{ "asreax2", REG_EAX, REG_EAX | REG_TMP1 },
{ "asreax3", REG_EAX, REG_EAX | REG_TMP1 },
{ "asreax4", REG_EAX, REG_EAXY | REG_TMP1 },
{ "bcasta", REG_A, REG_AX },
{ "bcastax", REG_AX, REG_AX },
{ "bcasteax", REG_EAX, REG_EAX | REG_TMP1 },
{ "bnega", REG_A, REG_AX },
{ "bnegax", REG_AX, REG_AX },
{ "bnegeax", REG_EAX, REG_EAX | REG_TMP1 },

View File

@@ -2328,6 +2328,7 @@ static int HarmlessCall (const char* Name)
"asrax3",
"asrax4",
"asraxy",
"bcastax",
"bnegax",
"complax",
"decax1",