1.BaseMemoryLibMmx: Add X64 Cpu Arch support.
2.BasePrintLib: Fix some minor bugs git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@651 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@@ -227,6 +227,17 @@ BasePrintLibVSPrint (
|
||||
Precision = Count;
|
||||
}
|
||||
break;
|
||||
|
||||
case '\0':
|
||||
//
|
||||
// Make no output if Format string terminates unexpectedly when
|
||||
// looking up for flag, width, precision and type.
|
||||
//
|
||||
Format -= BytesPerFormatCharacter;
|
||||
Precision = 0;
|
||||
//
|
||||
// break skiped on purpose.
|
||||
//
|
||||
default:
|
||||
Done = TRUE;
|
||||
break;
|
||||
@@ -299,19 +310,26 @@ BasePrintLibVSPrint (
|
||||
Count = 0;
|
||||
}
|
||||
ArgumentString = (CHAR8 *)ValueBuffer + Count;
|
||||
Digits = 3 - (Count % 3);
|
||||
|
||||
Digits = Count % 3;
|
||||
if (Digits != 0) {
|
||||
Digits = 3 - Digits;
|
||||
}
|
||||
if (Comma && Count != 0) {
|
||||
Count += ((Count - 1) / 3);
|
||||
}
|
||||
if (Prefix != 0) {
|
||||
Count++;
|
||||
Precision++;
|
||||
}
|
||||
Flags |= ARGUMENT_REVERSED;
|
||||
ZeroPad = TRUE;
|
||||
if ((Flags & PREFIX_ZERO) != 0) {
|
||||
if ((Flags & PAD_TO_WIDTH) != 0) {
|
||||
if ((Flags & PRECISION) == 0) {
|
||||
Precision = Width;
|
||||
if ((Flags & LEFT_JUSTIFY) == 0) {
|
||||
if ((Flags & PAD_TO_WIDTH) != 0) {
|
||||
if ((Flags & PRECISION) == 0) {
|
||||
Precision = Width;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -158,6 +158,7 @@ BasePrintLibConvertValueToString (
|
||||
if (Value < 0) {
|
||||
Value = -Value;
|
||||
Buffer = BasePrintLibFillBuffer (Buffer, 1, '-', Increment);
|
||||
Width--;
|
||||
}
|
||||
|
||||
Count = BasePrintLibValueToString (ValueBuffer, Value, 10);
|
||||
@@ -166,7 +167,10 @@ BasePrintLibConvertValueToString (
|
||||
Buffer = BasePrintLibFillBuffer (Buffer, Width - Count, '0', Increment);
|
||||
}
|
||||
|
||||
Digits = 3 - (Count % 3);
|
||||
Digits = Count % 3;
|
||||
if (Digits != 0) {
|
||||
Digits = 3 - Digits;
|
||||
}
|
||||
for (Index = 0; Index < Count; Index++) {
|
||||
Buffer = BasePrintLibFillBuffer (Buffer, 1, ValueBuffer[Count - Index], Increment);
|
||||
if ((Flags & COMMA_TYPE) != 0) {
|
||||
|
Reference in New Issue
Block a user