mirror of https://github.com/acidanthera/audk.git
MdeModulePkg/EbcDxe: Avoid Non-Boolean type used as Boolean
Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Pete Batard <pete@akeo.ie> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Jiewen.yao@intel.com
This commit is contained in:
parent
3e118ea87d
commit
532daaed0d
|
@ -194,8 +194,8 @@ EdbDisasmJMP (
|
||||||
// } else {
|
// } else {
|
||||||
// EdbPrintInstructionName (L"32");
|
// EdbPrintInstructionName (L"32");
|
||||||
// }
|
// }
|
||||||
if (Modifiers & CONDITION_M_CONDITIONAL) {
|
if ((Modifiers & CONDITION_M_CONDITIONAL) != 0) {
|
||||||
if (Modifiers & JMP_M_CS) {
|
if ((Modifiers & JMP_M_CS) != 0) {
|
||||||
EdbPrintInstructionName (L"cs");
|
EdbPrintInstructionName (L"cs");
|
||||||
} else {
|
} else {
|
||||||
EdbPrintInstructionName (L"cc");
|
EdbPrintInstructionName (L"cc");
|
||||||
|
@ -203,9 +203,9 @@ EdbDisasmJMP (
|
||||||
}
|
}
|
||||||
|
|
||||||
InstructionAddress += 2;
|
InstructionAddress += 2;
|
||||||
if (Modifiers & OPCODE_M_IMMDATA64) {
|
if ((Modifiers & OPCODE_M_IMMDATA64) != 0) {
|
||||||
CopyMem (&Data64, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT64));
|
CopyMem (&Data64, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT64));
|
||||||
if (Modifiers & OPCODE_M_IMMDATA) {
|
if ((Modifiers & OPCODE_M_IMMDATA) != 0) {
|
||||||
EdbPrintData64 (Data64);
|
EdbPrintData64 (Data64);
|
||||||
} else {
|
} else {
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -260,8 +260,8 @@ EdbDisasmJMP8 (
|
||||||
*DisasmString = EdbPreInstructionString ();
|
*DisasmString = EdbPreInstructionString ();
|
||||||
|
|
||||||
EdbPrintInstructionName (L"JMP8");
|
EdbPrintInstructionName (L"JMP8");
|
||||||
if (Modifiers & CONDITION_M_CONDITIONAL) {
|
if ((Modifiers & CONDITION_M_CONDITIONAL) != 0) {
|
||||||
if (Modifiers & JMP_M_CS) {
|
if ((Modifiers & JMP_M_CS) != 0) {
|
||||||
EdbPrintInstructionName (L"cs");
|
EdbPrintInstructionName (L"cs");
|
||||||
} else {
|
} else {
|
||||||
EdbPrintInstructionName (L"cc");
|
EdbPrintInstructionName (L"cc");
|
||||||
|
@ -322,7 +322,7 @@ EdbDisasmCALL (
|
||||||
// } else {
|
// } else {
|
||||||
// EdbPrintInstructionName (L"32");
|
// EdbPrintInstructionName (L"32");
|
||||||
// }
|
// }
|
||||||
if (Operands & OPERAND_M_NATIVE_CALL) {
|
if ((Operands & OPERAND_M_NATIVE_CALL) != 0) {
|
||||||
EdbPrintInstructionName (L"EX");
|
EdbPrintInstructionName (L"EX");
|
||||||
}
|
}
|
||||||
// if ((Operands & OPERAND_M_RELATIVE_ADDR) == 0) {
|
// if ((Operands & OPERAND_M_RELATIVE_ADDR) == 0) {
|
||||||
|
@ -330,10 +330,10 @@ EdbDisasmCALL (
|
||||||
// }
|
// }
|
||||||
|
|
||||||
InstructionAddress += 2;
|
InstructionAddress += 2;
|
||||||
if (Modifiers & OPCODE_M_IMMDATA64) {
|
if ((Modifiers & OPCODE_M_IMMDATA64) != 0) {
|
||||||
CopyMem (&Data64, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT64));
|
CopyMem (&Data64, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT64));
|
||||||
Ip = Data64;
|
Ip = Data64;
|
||||||
if (Modifiers & OPCODE_M_IMMDATA) {
|
if ((Modifiers & OPCODE_M_IMMDATA) != 0) {
|
||||||
Result = EdbFindAndPrintSymbol ((UINTN)Ip);
|
Result = EdbFindAndPrintSymbol ((UINTN)Ip);
|
||||||
if (Result == 0) {
|
if (Result == 0) {
|
||||||
EdbPrintData64 (Data64);
|
EdbPrintData64 (Data64);
|
||||||
|
@ -342,7 +342,7 @@ EdbDisasmCALL (
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (Modifiers & OPCODE_M_IMMDATA) {
|
if ((Modifiers & OPCODE_M_IMMDATA) != 0) {
|
||||||
CopyMem (&Data32, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT32));
|
CopyMem (&Data32, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT32));
|
||||||
} else {
|
} else {
|
||||||
Data32 = 0;
|
Data32 = 0;
|
||||||
|
@ -355,20 +355,20 @@ EdbDisasmCALL (
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((Operands & OPERAND_M_INDIRECT1) == 0) {
|
if ((Operands & OPERAND_M_INDIRECT1) == 0) {
|
||||||
if (Operands & OPERAND_M_RELATIVE_ADDR) {
|
if ((Operands & OPERAND_M_RELATIVE_ADDR) != 0) {
|
||||||
Result = EdbFindAndPrintSymbol ((UINTN)(SavedInstructionAddress + Ip + Size));
|
Result = EdbFindAndPrintSymbol ((UINTN)(SavedInstructionAddress + Ip + Size));
|
||||||
} else {
|
} else {
|
||||||
Result = EdbFindAndPrintSymbol ((UINTN)Ip);
|
Result = EdbFindAndPrintSymbol ((UINTN)Ip);
|
||||||
}
|
}
|
||||||
if (Result == 0) {
|
if (Result == 0) {
|
||||||
EdbPrintRegister1 (Operands);
|
EdbPrintRegister1 (Operands);
|
||||||
if (Modifiers & OPCODE_M_IMMDATA) {
|
if ((Modifiers & OPCODE_M_IMMDATA) != 0) {
|
||||||
EdbPrintImmData32 (Data32);
|
EdbPrintImmData32 (Data32);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
EdbPrintRegister1 (Operands);
|
EdbPrintRegister1 (Operands);
|
||||||
if (Modifiers & OPCODE_M_IMMDATA) {
|
if ((Modifiers & OPCODE_M_IMMDATA) != 0) {
|
||||||
EdbPrintRawIndexData32 (Data32);
|
EdbPrintRawIndexData32 (Data32);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -453,7 +453,7 @@ EdbDisasmCMP (
|
||||||
Opcode = GET_OPCODE (InstructionAddress);
|
Opcode = GET_OPCODE (InstructionAddress);
|
||||||
Modifiers = GET_MODIFIERS (InstructionAddress);
|
Modifiers = GET_MODIFIERS (InstructionAddress);
|
||||||
Operands = GET_OPERANDS (InstructionAddress);
|
Operands = GET_OPERANDS (InstructionAddress);
|
||||||
if (Modifiers & OPCODE_M_IMMDATA) {
|
if ((Modifiers & OPCODE_M_IMMDATA) != 0) {
|
||||||
Size = 4;
|
Size = 4;
|
||||||
} else {
|
} else {
|
||||||
Size = 2;
|
Size = 2;
|
||||||
|
@ -495,9 +495,9 @@ EdbDisasmCMP (
|
||||||
EdbPrintComma ();
|
EdbPrintComma ();
|
||||||
EdbPrintRegister2 (Operands);
|
EdbPrintRegister2 (Operands);
|
||||||
|
|
||||||
if (Modifiers & OPCODE_M_IMMDATA) {
|
if ((Modifiers & OPCODE_M_IMMDATA) != 0) {
|
||||||
CopyMem (&Data16, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT16));
|
CopyMem (&Data16, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT16));
|
||||||
if (Operands & OPERAND_M_INDIRECT2) {
|
if ((Operands & OPERAND_M_INDIRECT2) != 0) {
|
||||||
EdbPrintRawIndexData16 (Data16);
|
EdbPrintRawIndexData16 (Data16);
|
||||||
} else {
|
} else {
|
||||||
EdbPrintImmDatan (Data16);
|
EdbPrintImmDatan (Data16);
|
||||||
|
@ -552,7 +552,7 @@ EdbDisasmUnsignedDataManip (
|
||||||
Opcode = GET_OPCODE (InstructionAddress);
|
Opcode = GET_OPCODE (InstructionAddress);
|
||||||
Operands = GET_OPERANDS (InstructionAddress);
|
Operands = GET_OPERANDS (InstructionAddress);
|
||||||
Modifiers = GET_MODIFIERS (InstructionAddress);
|
Modifiers = GET_MODIFIERS (InstructionAddress);
|
||||||
if (Modifiers & DATAMANIP_M_IMMDATA) {
|
if ((Modifiers & DATAMANIP_M_IMMDATA) != 0) {
|
||||||
Size = 4;
|
Size = 4;
|
||||||
} else {
|
} else {
|
||||||
Size = 2;
|
Size = 2;
|
||||||
|
@ -613,9 +613,9 @@ EdbDisasmUnsignedDataManip (
|
||||||
EdbPrintRegister2 (Operands);
|
EdbPrintRegister2 (Operands);
|
||||||
|
|
||||||
InstructionAddress += 2;
|
InstructionAddress += 2;
|
||||||
if (Modifiers & DATAMANIP_M_IMMDATA) {
|
if ((Modifiers & DATAMANIP_M_IMMDATA) != 0) {
|
||||||
CopyMem (&Data16, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT16));
|
CopyMem (&Data16, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT16));
|
||||||
if (Operands & OPERAND_M_INDIRECT2) {
|
if ((Operands & OPERAND_M_INDIRECT2) != 0) {
|
||||||
EdbPrintRawIndexData16 (Data16);
|
EdbPrintRawIndexData16 (Data16);
|
||||||
} else {
|
} else {
|
||||||
EdbPrintImmDatan (Data16);
|
EdbPrintImmDatan (Data16);
|
||||||
|
@ -665,7 +665,7 @@ EdbDisasmSignedDataManip (
|
||||||
Opcode = GET_OPCODE (InstructionAddress);
|
Opcode = GET_OPCODE (InstructionAddress);
|
||||||
Operands = GET_OPERANDS (InstructionAddress);
|
Operands = GET_OPERANDS (InstructionAddress);
|
||||||
Modifiers = GET_MODIFIERS (InstructionAddress);
|
Modifiers = GET_MODIFIERS (InstructionAddress);
|
||||||
if (Modifiers & DATAMANIP_M_IMMDATA) {
|
if ((Modifiers & DATAMANIP_M_IMMDATA) != 0) {
|
||||||
Size = 4;
|
Size = 4;
|
||||||
} else {
|
} else {
|
||||||
Size = 2;
|
Size = 2;
|
||||||
|
@ -711,9 +711,9 @@ EdbDisasmSignedDataManip (
|
||||||
EdbPrintRegister2 (Operands);
|
EdbPrintRegister2 (Operands);
|
||||||
|
|
||||||
InstructionAddress += 2;
|
InstructionAddress += 2;
|
||||||
if (Modifiers & DATAMANIP_M_IMMDATA) {
|
if ((Modifiers & DATAMANIP_M_IMMDATA) != 0) {
|
||||||
CopyMem (&Data16, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT16));
|
CopyMem (&Data16, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT16));
|
||||||
if (Operands & OPERAND_M_INDIRECT2) {
|
if ((Operands & OPERAND_M_INDIRECT2) != 0) {
|
||||||
EdbPrintRawIndexData16 (Data16);
|
EdbPrintRawIndexData16 (Data16);
|
||||||
} else {
|
} else {
|
||||||
EdbPrintImmDatan (Data16);
|
EdbPrintImmDatan (Data16);
|
||||||
|
@ -770,26 +770,26 @@ EdbDisasmMOVxx (
|
||||||
Modifiers = GET_MODIFIERS (InstructionAddress);
|
Modifiers = GET_MODIFIERS (InstructionAddress);
|
||||||
Operands = GET_OPERANDS (InstructionAddress);
|
Operands = GET_OPERANDS (InstructionAddress);
|
||||||
Size = 2;
|
Size = 2;
|
||||||
if (Modifiers & (OPCODE_M_IMMED_OP1 | OPCODE_M_IMMED_OP2)) {
|
if ((Modifiers & (OPCODE_M_IMMED_OP1 | OPCODE_M_IMMED_OP2)) != 0) {
|
||||||
if ((Opcode <= OPCODE_MOVQW) || (Opcode == OPCODE_MOVNW)) {
|
if ((Opcode <= OPCODE_MOVQW) || (Opcode == OPCODE_MOVNW)) {
|
||||||
if (Modifiers & OPCODE_M_IMMED_OP1) {
|
if ((Modifiers & OPCODE_M_IMMED_OP1) != 0) {
|
||||||
Size += 2;
|
Size += 2;
|
||||||
}
|
}
|
||||||
if (Modifiers & OPCODE_M_IMMED_OP2) {
|
if ((Modifiers & OPCODE_M_IMMED_OP2) != 0) {
|
||||||
Size += 2;
|
Size += 2;
|
||||||
}
|
}
|
||||||
} else if ((Opcode <= OPCODE_MOVQD) || (Opcode == OPCODE_MOVND)) {
|
} else if (((Opcode <= OPCODE_MOVQD) || (Opcode == OPCODE_MOVND)) != 0) {
|
||||||
if (Modifiers & OPCODE_M_IMMED_OP1) {
|
if ((Modifiers & OPCODE_M_IMMED_OP1) != 0) {
|
||||||
Size += 4;
|
Size += 4;
|
||||||
}
|
}
|
||||||
if (Modifiers & OPCODE_M_IMMED_OP2) {
|
if ((Modifiers & OPCODE_M_IMMED_OP2) != 0) {
|
||||||
Size += 4;
|
Size += 4;
|
||||||
}
|
}
|
||||||
} else if (Opcode == OPCODE_MOVQQ) {
|
} else if (Opcode == OPCODE_MOVQQ) {
|
||||||
if (Modifiers & OPCODE_M_IMMED_OP1) {
|
if ((Modifiers & OPCODE_M_IMMED_OP1) != 0) {
|
||||||
Size += 8;
|
Size += 8;
|
||||||
}
|
}
|
||||||
if (Modifiers & OPCODE_M_IMMED_OP2) {
|
if ((Modifiers & OPCODE_M_IMMED_OP2) != 0) {
|
||||||
Size += 8;
|
Size += 8;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -841,7 +841,7 @@ EdbDisasmMOVxx (
|
||||||
EdbPrintRegister1 (Operands);
|
EdbPrintRegister1 (Operands);
|
||||||
|
|
||||||
InstructionAddress += 2;
|
InstructionAddress += 2;
|
||||||
if (Modifiers & OPCODE_M_IMMED_OP1) {
|
if ((Modifiers & OPCODE_M_IMMED_OP1) != 0) {
|
||||||
if ((Opcode <= OPCODE_MOVQW) || (Opcode == OPCODE_MOVNW)) {
|
if ((Opcode <= OPCODE_MOVQW) || (Opcode == OPCODE_MOVNW)) {
|
||||||
CopyMem (&Data16, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT16));
|
CopyMem (&Data16, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT16));
|
||||||
InstructionAddress += 2;
|
InstructionAddress += 2;
|
||||||
|
@ -860,7 +860,7 @@ EdbDisasmMOVxx (
|
||||||
EdbPrintComma ();
|
EdbPrintComma ();
|
||||||
EdbPrintRegister2 (Operands);
|
EdbPrintRegister2 (Operands);
|
||||||
|
|
||||||
if (Modifiers & OPCODE_M_IMMED_OP2) {
|
if ((Modifiers & OPCODE_M_IMMED_OP2) != 0) {
|
||||||
if ((Opcode <= OPCODE_MOVQW) || (Opcode == OPCODE_MOVNW)) {
|
if ((Opcode <= OPCODE_MOVQW) || (Opcode == OPCODE_MOVNW)) {
|
||||||
CopyMem (&Data16, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT16));
|
CopyMem (&Data16, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT16));
|
||||||
EdbPrintRawIndexData16 (Data16);
|
EdbPrintRawIndexData16 (Data16);
|
||||||
|
@ -907,10 +907,10 @@ EdbDisasmMOVsnw (
|
||||||
Modifiers = GET_MODIFIERS (InstructionAddress);
|
Modifiers = GET_MODIFIERS (InstructionAddress);
|
||||||
Operands = GET_OPERANDS (InstructionAddress);
|
Operands = GET_OPERANDS (InstructionAddress);
|
||||||
Size = 2;
|
Size = 2;
|
||||||
if (Modifiers & OPCODE_M_IMMED_OP1) {
|
if ((Modifiers & OPCODE_M_IMMED_OP1) != 0) {
|
||||||
Size += 2;
|
Size += 2;
|
||||||
}
|
}
|
||||||
if (Modifiers & OPCODE_M_IMMED_OP2) {
|
if ((Modifiers & OPCODE_M_IMMED_OP2) != 0) {
|
||||||
Size += 2;
|
Size += 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -925,7 +925,7 @@ EdbDisasmMOVsnw (
|
||||||
EdbPrintRegister1 (Operands);
|
EdbPrintRegister1 (Operands);
|
||||||
|
|
||||||
InstructionAddress += 2;
|
InstructionAddress += 2;
|
||||||
if (Modifiers & OPCODE_M_IMMED_OP1) {
|
if ((Modifiers & OPCODE_M_IMMED_OP1) != 0) {
|
||||||
CopyMem (&Data16, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT16));
|
CopyMem (&Data16, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT16));
|
||||||
InstructionAddress += 2;
|
InstructionAddress += 2;
|
||||||
EdbPrintRawIndexData16 (Data16);
|
EdbPrintRawIndexData16 (Data16);
|
||||||
|
@ -934,9 +934,9 @@ EdbDisasmMOVsnw (
|
||||||
EdbPrintComma ();
|
EdbPrintComma ();
|
||||||
EdbPrintRegister2 (Operands);
|
EdbPrintRegister2 (Operands);
|
||||||
|
|
||||||
if (Modifiers & OPCODE_M_IMMED_OP2) {
|
if ((Modifiers & OPCODE_M_IMMED_OP2) != 0) {
|
||||||
CopyMem (&Data16, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT16));
|
CopyMem (&Data16, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT16));
|
||||||
if (Operands & OPERAND_M_INDIRECT2) {
|
if ((Operands & OPERAND_M_INDIRECT2) != 0) {
|
||||||
EdbPrintRawIndexData16 (Data16);
|
EdbPrintRawIndexData16 (Data16);
|
||||||
} else {
|
} else {
|
||||||
EdbPrintImmDatan (Data16);
|
EdbPrintImmDatan (Data16);
|
||||||
|
@ -977,10 +977,10 @@ EdbDisasmMOVsnd (
|
||||||
Modifiers = GET_MODIFIERS (InstructionAddress);
|
Modifiers = GET_MODIFIERS (InstructionAddress);
|
||||||
Operands = GET_OPERANDS (InstructionAddress);
|
Operands = GET_OPERANDS (InstructionAddress);
|
||||||
Size = 2;
|
Size = 2;
|
||||||
if (Modifiers & OPCODE_M_IMMED_OP1) {
|
if ((Modifiers & OPCODE_M_IMMED_OP1) != 0) {
|
||||||
Size += 4;
|
Size += 4;
|
||||||
}
|
}
|
||||||
if (Modifiers & OPCODE_M_IMMED_OP2) {
|
if ((Modifiers & OPCODE_M_IMMED_OP2) != 0) {
|
||||||
Size += 4;
|
Size += 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -995,7 +995,7 @@ EdbDisasmMOVsnd (
|
||||||
EdbPrintRegister1 (Operands);
|
EdbPrintRegister1 (Operands);
|
||||||
|
|
||||||
InstructionAddress += 2;
|
InstructionAddress += 2;
|
||||||
if (Modifiers & OPCODE_M_IMMED_OP1) {
|
if ((Modifiers & OPCODE_M_IMMED_OP1) != 0) {
|
||||||
CopyMem (&Data32, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT32));
|
CopyMem (&Data32, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT32));
|
||||||
InstructionAddress += 4;
|
InstructionAddress += 4;
|
||||||
EdbPrintRawIndexData32 (Data32);
|
EdbPrintRawIndexData32 (Data32);
|
||||||
|
@ -1004,9 +1004,9 @@ EdbDisasmMOVsnd (
|
||||||
EdbPrintComma ();
|
EdbPrintComma ();
|
||||||
EdbPrintRegister2 (Operands);
|
EdbPrintRegister2 (Operands);
|
||||||
|
|
||||||
if (Modifiers & OPCODE_M_IMMED_OP2) {
|
if ((Modifiers & OPCODE_M_IMMED_OP2) != 0) {
|
||||||
CopyMem (&Data32, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT32));
|
CopyMem (&Data32, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT32));
|
||||||
if (Operands & OPERAND_M_INDIRECT2) {
|
if ((Operands & OPERAND_M_INDIRECT2) != 0) {
|
||||||
EdbPrintRawIndexData32 (Data32);
|
EdbPrintRawIndexData32 (Data32);
|
||||||
} else {
|
} else {
|
||||||
EdbPrintImmDatan (Data32);
|
EdbPrintImmDatan (Data32);
|
||||||
|
@ -1131,7 +1131,7 @@ EdbDisasmPUSH (
|
||||||
|
|
||||||
Operands = GET_OPERANDS (InstructionAddress);
|
Operands = GET_OPERANDS (InstructionAddress);
|
||||||
Modifiers = GET_MODIFIERS (InstructionAddress);
|
Modifiers = GET_MODIFIERS (InstructionAddress);
|
||||||
if (Modifiers & PUSHPOP_M_IMMDATA) {
|
if ((Modifiers & PUSHPOP_M_IMMDATA) != 0) {
|
||||||
Size = 4;
|
Size = 4;
|
||||||
} else {
|
} else {
|
||||||
Size = 2;
|
Size = 2;
|
||||||
|
@ -1153,9 +1153,9 @@ EdbDisasmPUSH (
|
||||||
EdbPrintRegister1 (Operands);
|
EdbPrintRegister1 (Operands);
|
||||||
|
|
||||||
InstructionAddress += 2;
|
InstructionAddress += 2;
|
||||||
if (Modifiers & PUSHPOP_M_IMMDATA) {
|
if ((Modifiers & PUSHPOP_M_IMMDATA) != 0) {
|
||||||
CopyMem (&Data16, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT16));
|
CopyMem (&Data16, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT16));
|
||||||
if (Operands & OPERAND_M_INDIRECT1) {
|
if ((Operands & OPERAND_M_INDIRECT1) != 0) {
|
||||||
EdbPrintRawIndexData16 (Data16);
|
EdbPrintRawIndexData16 (Data16);
|
||||||
} else {
|
} else {
|
||||||
EdbPrintImmDatan (Data16);
|
EdbPrintImmDatan (Data16);
|
||||||
|
@ -1195,7 +1195,7 @@ EdbDisasmPOP (
|
||||||
|
|
||||||
Operands = GET_OPERANDS (InstructionAddress);
|
Operands = GET_OPERANDS (InstructionAddress);
|
||||||
Modifiers = GET_MODIFIERS (InstructionAddress);
|
Modifiers = GET_MODIFIERS (InstructionAddress);
|
||||||
if (Modifiers & PUSHPOP_M_IMMDATA) {
|
if ((Modifiers & PUSHPOP_M_IMMDATA) != 0) {
|
||||||
Size = 4;
|
Size = 4;
|
||||||
} else {
|
} else {
|
||||||
Size = 2;
|
Size = 2;
|
||||||
|
@ -1217,9 +1217,9 @@ EdbDisasmPOP (
|
||||||
EdbPrintRegister1 (Operands);
|
EdbPrintRegister1 (Operands);
|
||||||
|
|
||||||
InstructionAddress += 2;
|
InstructionAddress += 2;
|
||||||
if (Modifiers & PUSHPOP_M_IMMDATA) {
|
if ((Modifiers & PUSHPOP_M_IMMDATA) != 0) {
|
||||||
CopyMem (&Data16, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT16));
|
CopyMem (&Data16, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT16));
|
||||||
if (Operands & OPERAND_M_INDIRECT1) {
|
if ((Operands & OPERAND_M_INDIRECT1) != 0) {
|
||||||
EdbPrintRawIndexData16 (Data16);
|
EdbPrintRawIndexData16 (Data16);
|
||||||
} else {
|
} else {
|
||||||
EdbPrintImmDatan (Data16);
|
EdbPrintImmDatan (Data16);
|
||||||
|
@ -1274,10 +1274,10 @@ EdbDisasmCMPI (
|
||||||
}
|
}
|
||||||
|
|
||||||
Size = 2;
|
Size = 2;
|
||||||
if (Operands & OPERAND_M_CMPI_INDEX) {
|
if ((Operands & OPERAND_M_CMPI_INDEX) != 0) {
|
||||||
Size += 2;
|
Size += 2;
|
||||||
}
|
}
|
||||||
if (Modifiers & OPCODE_M_CMPI32_DATA) {
|
if ((Modifiers & OPCODE_M_CMPI32_DATA) != 0) {
|
||||||
Size += 4;
|
Size += 4;
|
||||||
} else {
|
} else {
|
||||||
Size += 2;
|
Size += 2;
|
||||||
|
@ -1295,7 +1295,7 @@ EdbDisasmCMPI (
|
||||||
// } else {
|
// } else {
|
||||||
// EdbPrintInstructionName (L"32");
|
// EdbPrintInstructionName (L"32");
|
||||||
// }
|
// }
|
||||||
if (Modifiers & OPCODE_M_CMPI32_DATA) {
|
if ((Modifiers & OPCODE_M_CMPI32_DATA) != 0) {
|
||||||
EdbPrintInstructionName (L"d");
|
EdbPrintInstructionName (L"d");
|
||||||
} else {
|
} else {
|
||||||
EdbPrintInstructionName (L"w");
|
EdbPrintInstructionName (L"w");
|
||||||
|
@ -1321,7 +1321,7 @@ EdbDisasmCMPI (
|
||||||
EdbPrintRegister1 (Operands);
|
EdbPrintRegister1 (Operands);
|
||||||
|
|
||||||
InstructionAddress += 2;
|
InstructionAddress += 2;
|
||||||
if (Operands & OPERAND_M_CMPI_INDEX) {
|
if ((Operands & OPERAND_M_CMPI_INDEX) != 0) {
|
||||||
CopyMem (&Data16, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT16));
|
CopyMem (&Data16, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT16));
|
||||||
InstructionAddress += 2;
|
InstructionAddress += 2;
|
||||||
EdbPrintRawIndexData16 (Data16);
|
EdbPrintRawIndexData16 (Data16);
|
||||||
|
@ -1329,7 +1329,7 @@ EdbDisasmCMPI (
|
||||||
|
|
||||||
EdbPrintComma ();
|
EdbPrintComma ();
|
||||||
|
|
||||||
if (Modifiers & OPCODE_M_CMPI32_DATA) {
|
if ((Modifiers & OPCODE_M_CMPI32_DATA) != 0) {
|
||||||
CopyMem (&Data32, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT32));
|
CopyMem (&Data32, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT32));
|
||||||
EdbPrintDatan (Data32);
|
EdbPrintDatan (Data32);
|
||||||
} else {
|
} else {
|
||||||
|
@ -1370,7 +1370,7 @@ EdbDisasmPUSHn (
|
||||||
|
|
||||||
Operands = GET_OPERANDS (InstructionAddress);
|
Operands = GET_OPERANDS (InstructionAddress);
|
||||||
Modifiers = GET_MODIFIERS (InstructionAddress);
|
Modifiers = GET_MODIFIERS (InstructionAddress);
|
||||||
if (Modifiers & PUSHPOP_M_IMMDATA) {
|
if ((Modifiers & PUSHPOP_M_IMMDATA) != 0) {
|
||||||
Size = 4;
|
Size = 4;
|
||||||
} else {
|
} else {
|
||||||
Size = 2;
|
Size = 2;
|
||||||
|
@ -1387,9 +1387,9 @@ EdbDisasmPUSHn (
|
||||||
EdbPrintRegister1 (Operands);
|
EdbPrintRegister1 (Operands);
|
||||||
|
|
||||||
InstructionAddress += 2;
|
InstructionAddress += 2;
|
||||||
if (Modifiers & PUSHPOP_M_IMMDATA) {
|
if ((Modifiers & PUSHPOP_M_IMMDATA) != 0) {
|
||||||
CopyMem (&Data16, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT16));
|
CopyMem (&Data16, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT16));
|
||||||
if (Operands & OPERAND_M_INDIRECT1) {
|
if ((Operands & OPERAND_M_INDIRECT1) != 0) {
|
||||||
EdbPrintRawIndexData16 (Data16);
|
EdbPrintRawIndexData16 (Data16);
|
||||||
} else {
|
} else {
|
||||||
EdbPrintImmDatan (Data16);
|
EdbPrintImmDatan (Data16);
|
||||||
|
@ -1429,7 +1429,7 @@ EdbDisasmPOPn (
|
||||||
|
|
||||||
Operands = GET_OPERANDS (InstructionAddress);
|
Operands = GET_OPERANDS (InstructionAddress);
|
||||||
Modifiers = GET_MODIFIERS (InstructionAddress);
|
Modifiers = GET_MODIFIERS (InstructionAddress);
|
||||||
if (Modifiers & PUSHPOP_M_IMMDATA) {
|
if ((Modifiers & PUSHPOP_M_IMMDATA) != 0) {
|
||||||
Size = 4;
|
Size = 4;
|
||||||
} else {
|
} else {
|
||||||
Size = 2;
|
Size = 2;
|
||||||
|
@ -1446,9 +1446,9 @@ EdbDisasmPOPn (
|
||||||
EdbPrintRegister1 (Operands);
|
EdbPrintRegister1 (Operands);
|
||||||
|
|
||||||
InstructionAddress += 2;
|
InstructionAddress += 2;
|
||||||
if (Modifiers & PUSHPOP_M_IMMDATA) {
|
if ((Modifiers & PUSHPOP_M_IMMDATA) != 0) {
|
||||||
CopyMem (&Data16, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT16));
|
CopyMem (&Data16, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT16));
|
||||||
if (Operands & OPERAND_M_INDIRECT1) {
|
if ((Operands & OPERAND_M_INDIRECT1) != 0) {
|
||||||
EdbPrintRawIndexData16 (Data16);
|
EdbPrintRawIndexData16 (Data16);
|
||||||
} else {
|
} else {
|
||||||
EdbPrintImmDatan (Data16);
|
EdbPrintImmDatan (Data16);
|
||||||
|
@ -1491,7 +1491,7 @@ EdbDisasmMOVI (
|
||||||
Modifiers = GET_MODIFIERS (InstructionAddress);
|
Modifiers = GET_MODIFIERS (InstructionAddress);
|
||||||
Operands = GET_OPERANDS (InstructionAddress);
|
Operands = GET_OPERANDS (InstructionAddress);
|
||||||
|
|
||||||
if (Operands & MOVI_M_IMMDATA) {
|
if ((Operands & MOVI_M_IMMDATA) != 0) {
|
||||||
Size = 4;
|
Size = 4;
|
||||||
} else {
|
} else {
|
||||||
Size = 2;
|
Size = 2;
|
||||||
|
@ -1540,7 +1540,7 @@ EdbDisasmMOVI (
|
||||||
EdbPrintRegister1 (Operands);
|
EdbPrintRegister1 (Operands);
|
||||||
|
|
||||||
InstructionAddress += 2;
|
InstructionAddress += 2;
|
||||||
if (Operands & MOVI_M_IMMDATA) {
|
if ((Operands & MOVI_M_IMMDATA) != 0) {
|
||||||
CopyMem (&Data16, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT16));
|
CopyMem (&Data16, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT16));
|
||||||
InstructionAddress += 2;
|
InstructionAddress += 2;
|
||||||
EdbPrintRawIndexData16 (Data16);
|
EdbPrintRawIndexData16 (Data16);
|
||||||
|
@ -1599,7 +1599,7 @@ EdbDisasmMOVIn (
|
||||||
Modifiers = GET_MODIFIERS (InstructionAddress);
|
Modifiers = GET_MODIFIERS (InstructionAddress);
|
||||||
Operands = GET_OPERANDS (InstructionAddress);
|
Operands = GET_OPERANDS (InstructionAddress);
|
||||||
|
|
||||||
if (Operands & MOVI_M_IMMDATA) {
|
if ((Operands & MOVI_M_IMMDATA) != 0) {
|
||||||
Size = 4;
|
Size = 4;
|
||||||
} else {
|
} else {
|
||||||
Size = 2;
|
Size = 2;
|
||||||
|
@ -1634,7 +1634,7 @@ EdbDisasmMOVIn (
|
||||||
EdbPrintRegister1 (Operands);
|
EdbPrintRegister1 (Operands);
|
||||||
|
|
||||||
InstructionAddress += 2;
|
InstructionAddress += 2;
|
||||||
if (Operands & MOVI_M_IMMDATA) {
|
if ((Operands & MOVI_M_IMMDATA) != 0) {
|
||||||
CopyMem (&Data16, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT16));
|
CopyMem (&Data16, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT16));
|
||||||
InstructionAddress += 2;
|
InstructionAddress += 2;
|
||||||
EdbPrintRawIndexData16 (Data16);
|
EdbPrintRawIndexData16 (Data16);
|
||||||
|
@ -1696,7 +1696,7 @@ EdbDisasmMOVREL (
|
||||||
Modifiers = GET_MODIFIERS (InstructionAddress);
|
Modifiers = GET_MODIFIERS (InstructionAddress);
|
||||||
Operands = GET_OPERANDS (InstructionAddress);
|
Operands = GET_OPERANDS (InstructionAddress);
|
||||||
|
|
||||||
if (Operands & MOVI_M_IMMDATA) {
|
if ((Operands & MOVI_M_IMMDATA) != 0) {
|
||||||
Size = 4;
|
Size = 4;
|
||||||
} else {
|
} else {
|
||||||
Size = 2;
|
Size = 2;
|
||||||
|
@ -1733,7 +1733,7 @@ EdbDisasmMOVREL (
|
||||||
EdbPrintRegister1 (Operands);
|
EdbPrintRegister1 (Operands);
|
||||||
|
|
||||||
InstructionAddress += 2;
|
InstructionAddress += 2;
|
||||||
if (Operands & MOVI_M_IMMDATA) {
|
if ((Operands & MOVI_M_IMMDATA) != 0) {
|
||||||
CopyMem (&Data16, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT16));
|
CopyMem (&Data16, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT16));
|
||||||
InstructionAddress += 2;
|
InstructionAddress += 2;
|
||||||
EdbPrintRawIndexData16 (Data16);
|
EdbPrintRawIndexData16 (Data16);
|
||||||
|
|
|
@ -270,7 +270,7 @@ EdbPrintRegister1 (
|
||||||
IN UINT8 Operands
|
IN UINT8 Operands
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if (Operands & OPERAND_M_INDIRECT1) {
|
if ((Operands & OPERAND_M_INDIRECT1) != 0) {
|
||||||
EDBSPrintWithOffset (
|
EDBSPrintWithOffset (
|
||||||
mInstructionString.Content,
|
mInstructionString.Content,
|
||||||
EDB_INSTRUCTION_CONTENT_MAX_SIZE,
|
EDB_INSTRUCTION_CONTENT_MAX_SIZE,
|
||||||
|
@ -305,7 +305,7 @@ EdbPrintRegister2 (
|
||||||
IN UINT8 Operands
|
IN UINT8 Operands
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if (Operands & OPERAND_M_INDIRECT2) {
|
if ((Operands & OPERAND_M_INDIRECT2) != 0) {
|
||||||
EDBSPrintWithOffset (
|
EDBSPrintWithOffset (
|
||||||
mInstructionString.Content,
|
mInstructionString.Content,
|
||||||
EDB_INSTRUCTION_CONTENT_MAX_SIZE,
|
EDB_INSTRUCTION_CONTENT_MAX_SIZE,
|
||||||
|
|
|
@ -37,19 +37,19 @@ Xtoi (
|
||||||
//
|
//
|
||||||
// skip preceeding white space
|
// skip preceeding white space
|
||||||
//
|
//
|
||||||
while (*Str && *Str == ' ') {
|
while (*Str != '\0' && *Str == ' ') {
|
||||||
Str += 1;
|
Str += 1;
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
// skip preceeding zeros
|
// skip preceeding zeros
|
||||||
//
|
//
|
||||||
while (*Str && *Str == '0') {
|
while (*Str != '\0' && *Str == '0') {
|
||||||
Str += 1;
|
Str += 1;
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
// skip preceeding white space
|
// skip preceeding white space
|
||||||
//
|
//
|
||||||
if (*Str && (*Str == 'x' || *Str == 'X')) {
|
if (*Str != '\0' && (*Str == 'x' || *Str == 'X')) {
|
||||||
Str += 1;
|
Str += 1;
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
|
@ -57,7 +57,7 @@ Xtoi (
|
||||||
//
|
//
|
||||||
RetVal = 0;
|
RetVal = 0;
|
||||||
TempChar = *(Str++);
|
TempChar = *(Str++);
|
||||||
while (TempChar) {
|
while (TempChar != '\0') {
|
||||||
if (TempChar >= 'a' && TempChar <= 'f') {
|
if (TempChar >= 'a' && TempChar <= 'f') {
|
||||||
TempChar -= 'a' - 'A';
|
TempChar -= 'a' - 'A';
|
||||||
}
|
}
|
||||||
|
@ -102,19 +102,19 @@ LXtoi (
|
||||||
//
|
//
|
||||||
// skip preceeding white space
|
// skip preceeding white space
|
||||||
//
|
//
|
||||||
while (*Str && *Str == ' ') {
|
while (*Str != '\0' && *Str == ' ') {
|
||||||
Str += 1;
|
Str += 1;
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
// skip preceeding zeros
|
// skip preceeding zeros
|
||||||
//
|
//
|
||||||
while (*Str && *Str == '0') {
|
while (*Str != '\0' && *Str == '0') {
|
||||||
Str += 1;
|
Str += 1;
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
// skip preceeding white space
|
// skip preceeding white space
|
||||||
//
|
//
|
||||||
if (*Str && (*Str == 'x' || *Str == 'X')) {
|
if (*Str != '\0' && (*Str == 'x' || *Str == 'X')) {
|
||||||
Str += 1;
|
Str += 1;
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
|
@ -122,7 +122,7 @@ LXtoi (
|
||||||
//
|
//
|
||||||
RetVal = 0;
|
RetVal = 0;
|
||||||
TempChar = *(Str++);
|
TempChar = *(Str++);
|
||||||
while (TempChar) {
|
while (TempChar != '\0') {
|
||||||
if (TempChar >= 'a' && TempChar <= 'f') {
|
if (TempChar >= 'a' && TempChar <= 'f') {
|
||||||
TempChar -= 'a' - 'A';
|
TempChar -= 'a' - 'A';
|
||||||
}
|
}
|
||||||
|
@ -169,7 +169,7 @@ Atoi (
|
||||||
//
|
//
|
||||||
// skip preceeding white space
|
// skip preceeding white space
|
||||||
//
|
//
|
||||||
while (*Str && *Str == ' ') {
|
while (*Str != '\0' && *Str == ' ') {
|
||||||
Str += 1;
|
Str += 1;
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
|
@ -177,7 +177,7 @@ Atoi (
|
||||||
//
|
//
|
||||||
RetVal = 0;
|
RetVal = 0;
|
||||||
TempChar = *(Str++);
|
TempChar = *(Str++);
|
||||||
while (TempChar) {
|
while (TempChar != '\0') {
|
||||||
if (TempChar >= '0' && TempChar <= '9') {
|
if (TempChar >= '0' && TempChar <= '9') {
|
||||||
if (RetVal > MaxVal || (RetVal == MaxVal && TempChar - '0' > (INTN) ResteVal)) {
|
if (RetVal > MaxVal || (RetVal == MaxVal && TempChar - '0' > (INTN) ResteVal)) {
|
||||||
return (UINTN) -1;
|
return (UINTN) -1;
|
||||||
|
@ -217,19 +217,19 @@ AsciiXtoi (
|
||||||
//
|
//
|
||||||
// skip preceeding white space
|
// skip preceeding white space
|
||||||
//
|
//
|
||||||
while (*Str && *Str == ' ') {
|
while (*Str != '\0' && *Str == ' ') {
|
||||||
Str += 1;
|
Str += 1;
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
// skip preceeding zeros
|
// skip preceeding zeros
|
||||||
//
|
//
|
||||||
while (*Str && *Str == '0') {
|
while (*Str != '\0' && *Str == '0') {
|
||||||
Str += 1;
|
Str += 1;
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
// skip preceeding white space
|
// skip preceeding white space
|
||||||
//
|
//
|
||||||
if (*Str && (*Str == 'x' || *Str == 'X')) {
|
if (*Str != '\0' && (*Str == 'x' || *Str == 'X')) {
|
||||||
Str += 1;
|
Str += 1;
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
|
@ -237,7 +237,7 @@ AsciiXtoi (
|
||||||
//
|
//
|
||||||
RetVal = 0;
|
RetVal = 0;
|
||||||
TempChar = *(Str++);
|
TempChar = *(Str++);
|
||||||
while (TempChar) {
|
while (TempChar != '\0') {
|
||||||
if (TempChar >= 'a' && TempChar <= 'f') {
|
if (TempChar >= 'a' && TempChar <= 'f') {
|
||||||
TempChar -= 'a' - 'A';
|
TempChar -= 'a' - 'A';
|
||||||
}
|
}
|
||||||
|
@ -283,7 +283,7 @@ AsciiAtoi (
|
||||||
//
|
//
|
||||||
// skip preceeding white space
|
// skip preceeding white space
|
||||||
//
|
//
|
||||||
while (*Str && *Str == ' ') {
|
while (*Str != '\0' && *Str == ' ') {
|
||||||
Str += 1;
|
Str += 1;
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
|
@ -291,7 +291,7 @@ AsciiAtoi (
|
||||||
//
|
//
|
||||||
RetVal = 0;
|
RetVal = 0;
|
||||||
TempChar = *(Str++);
|
TempChar = *(Str++);
|
||||||
while (TempChar) {
|
while (TempChar != '\0') {
|
||||||
if (TempChar >= '0' && TempChar <= '9') {
|
if (TempChar >= '0' && TempChar <= '9') {
|
||||||
if (RetVal > MaxVal || (RetVal == MaxVal && TempChar - '0' > (INTN) ResteVal)) {
|
if (RetVal > MaxVal || (RetVal == MaxVal && TempChar - '0' > (INTN) ResteVal)) {
|
||||||
return (UINTN) -1;
|
return (UINTN) -1;
|
||||||
|
@ -345,7 +345,7 @@ StrCmpUnicodeAndAscii (
|
||||||
IN CHAR8 *String2
|
IN CHAR8 *String2
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
while (*String) {
|
while (*String != '\0') {
|
||||||
if (*String != (CHAR16)*String2) {
|
if (*String != (CHAR16)*String2) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -463,7 +463,7 @@ StrDuplicate (
|
||||||
|
|
||||||
Size = (StrLen(Src) + 1) * sizeof(CHAR16);
|
Size = (StrLen(Src) + 1) * sizeof(CHAR16);
|
||||||
Dest = AllocateZeroPool (Size);
|
Dest = AllocateZeroPool (Size);
|
||||||
if (Dest) {
|
if (Dest != NULL) {
|
||||||
CopyMem (Dest, Src, Size);
|
CopyMem (Dest, Src, Size);
|
||||||
}
|
}
|
||||||
return Dest;
|
return Dest;
|
||||||
|
@ -678,7 +678,7 @@ PatchForStrTokenAfter (
|
||||||
}
|
}
|
||||||
*Str = Patch;
|
*Str = Patch;
|
||||||
|
|
||||||
while (*(Str ++)) {
|
while (*(Str ++) != '\0') {
|
||||||
if (*Str == 0) {
|
if (*Str == 0) {
|
||||||
*Str = Patch;
|
*Str = Patch;
|
||||||
} else {
|
} else {
|
||||||
|
@ -703,7 +703,7 @@ PatchForStrTokenBefore (
|
||||||
}
|
}
|
||||||
|
|
||||||
Str = Buffer;
|
Str = Buffer;
|
||||||
while (*(Str --)) {
|
while (*(Str --) != '\0') {
|
||||||
if ((*Str == 0) || (*Str == Patch)) {
|
if ((*Str == 0) || (*Str == Patch)) {
|
||||||
*Str = Patch;
|
*Str = Patch;
|
||||||
} else {
|
} else {
|
||||||
|
@ -920,7 +920,7 @@ PatchForAsciiStrTokenAfter (
|
||||||
}
|
}
|
||||||
*Str = Patch;
|
*Str = Patch;
|
||||||
|
|
||||||
while (*(Str ++)) {
|
while (*(Str ++) != '\0') {
|
||||||
if (*Str == 0) {
|
if (*Str == 0) {
|
||||||
*Str = Patch;
|
*Str = Patch;
|
||||||
} else {
|
} else {
|
||||||
|
@ -945,7 +945,7 @@ PatchForAsciiStrTokenBefore (
|
||||||
}
|
}
|
||||||
|
|
||||||
Str = Buffer;
|
Str = Buffer;
|
||||||
while (*(Str --)) {
|
while (*(Str --) != '\0') {
|
||||||
if ((*Str == 0) || (*Str == Patch)) {
|
if ((*Str == 0) || (*Str == Patch)) {
|
||||||
*Str = Patch;
|
*Str = Patch;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -50,7 +50,7 @@ WaitForSingleEvent (
|
||||||
EFI_EVENT TimerEvent;
|
EFI_EVENT TimerEvent;
|
||||||
EFI_EVENT WaitList[2];
|
EFI_EVENT WaitList[2];
|
||||||
|
|
||||||
if (Timeout) {
|
if (Timeout != 0) {
|
||||||
//
|
//
|
||||||
// Create a timer event
|
// Create a timer event
|
||||||
//
|
//
|
||||||
|
@ -204,7 +204,7 @@ Input (
|
||||||
ASSERT (ConIn != NULL);
|
ASSERT (ConIn != NULL);
|
||||||
ASSERT (InStr != NULL);
|
ASSERT (InStr != NULL);
|
||||||
|
|
||||||
if (Prompt) {
|
if (Prompt != NULL) {
|
||||||
ConOut->OutputString (ConOut, Prompt);
|
ConOut->OutputString (ConOut, Prompt);
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
|
@ -255,7 +255,7 @@ Input (
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CHAR_BACKSPACE:
|
case CHAR_BACKSPACE:
|
||||||
if (StrPos) {
|
if (StrPos != 0) {
|
||||||
//
|
//
|
||||||
// If not move back beyond string beginning, move all characters behind
|
// If not move back beyond string beginning, move all characters behind
|
||||||
// the current position one character forward
|
// the current position one character forward
|
||||||
|
@ -307,7 +307,7 @@ Input (
|
||||||
//
|
//
|
||||||
// Move characters behind current position one character forward
|
// Move characters behind current position one character forward
|
||||||
//
|
//
|
||||||
if (Len) {
|
if (Len != 0) {
|
||||||
Update = StrPos;
|
Update = StrPos;
|
||||||
Delete = 1;
|
Delete = 1;
|
||||||
CopyMem (InStr + StrPos, InStr + StrPos + 1, sizeof (CHAR16) * (Len - StrPos));
|
CopyMem (InStr + StrPos, InStr + StrPos + 1, sizeof (CHAR16) * (Len - StrPos));
|
||||||
|
@ -320,7 +320,7 @@ Input (
|
||||||
//
|
//
|
||||||
// Adjust current cursor position
|
// Adjust current cursor position
|
||||||
//
|
//
|
||||||
if (StrPos) {
|
if (StrPos != 0) {
|
||||||
StrPos -= 1;
|
StrPos -= 1;
|
||||||
ConMoveCursorBackward (LineLength, &Column, &Row);
|
ConMoveCursorBackward (LineLength, &Column, &Row);
|
||||||
}
|
}
|
||||||
|
@ -447,7 +447,7 @@ Input (
|
||||||
EDBPrint (InStr + Update);
|
EDBPrint (InStr + Update);
|
||||||
Len = StrLen (InStr);
|
Len = StrLen (InStr);
|
||||||
|
|
||||||
if (Delete) {
|
if (Delete != 0) {
|
||||||
SetMem (InStr + Len, Delete * sizeof (CHAR16), 0x00);
|
SetMem (InStr + Len, Delete * sizeof (CHAR16), 0x00);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2987,7 +2987,7 @@ ExecuteCALL (
|
||||||
Opcode = GETOPCODE (VmPtr);
|
Opcode = GETOPCODE (VmPtr);
|
||||||
Operands = GETOPERANDS (VmPtr);
|
Operands = GETOPERANDS (VmPtr);
|
||||||
|
|
||||||
if (Operands & OPERAND_M_NATIVE_CALL) {
|
if ((Operands & OPERAND_M_NATIVE_CALL) != 0) {
|
||||||
EbcDebuggerHookCALLEXStart (VmPtr);
|
EbcDebuggerHookCALLEXStart (VmPtr);
|
||||||
} else {
|
} else {
|
||||||
EbcDebuggerHookCALLStart (VmPtr);
|
EbcDebuggerHookCALLStart (VmPtr);
|
||||||
|
@ -3094,7 +3094,7 @@ ExecuteCALL (
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Operands & OPERAND_M_NATIVE_CALL) {
|
if ((Operands & OPERAND_M_NATIVE_CALL) != 0) {
|
||||||
EbcDebuggerHookCALLEXEnd (VmPtr);
|
EbcDebuggerHookCALLEXEnd (VmPtr);
|
||||||
} else {
|
} else {
|
||||||
EbcDebuggerHookCALLEnd (VmPtr);
|
EbcDebuggerHookCALLEnd (VmPtr);
|
||||||
|
|
Loading…
Reference in New Issue