mirror of https://github.com/acidanthera/audk.git
1) Add support for %p to print pointers
2) Fix %d,%x,%X to pull values off the vararg stack using (int) and (unsigned int) types to resolve compatibility issues with X64 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@408 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
3a0a3d3878
commit
1d580c1447
|
@ -235,6 +235,10 @@ BasePrintLibVSPrint (
|
||||||
// Handle each argument type
|
// Handle each argument type
|
||||||
//
|
//
|
||||||
switch (FormatCharacter) {
|
switch (FormatCharacter) {
|
||||||
|
case 'p':
|
||||||
|
if (sizeof (VOID *) > 4) {
|
||||||
|
Flags |= LONG_TYPE;
|
||||||
|
}
|
||||||
case 'X':
|
case 'X':
|
||||||
Flags |= PREFIX_ZERO;
|
Flags |= PREFIX_ZERO;
|
||||||
//
|
//
|
||||||
|
@ -247,7 +251,7 @@ BasePrintLibVSPrint (
|
||||||
//
|
//
|
||||||
case 'd':
|
case 'd':
|
||||||
if ((Flags & LONG_TYPE) == 0) {
|
if ((Flags & LONG_TYPE) == 0) {
|
||||||
Value = (VA_ARG (Marker, INTN));
|
Value = (VA_ARG (Marker, int));
|
||||||
} else {
|
} else {
|
||||||
Value = VA_ARG (Marker, INT64);
|
Value = VA_ARG (Marker, INT64);
|
||||||
}
|
}
|
||||||
|
@ -275,7 +279,7 @@ BasePrintLibVSPrint (
|
||||||
Radix = 16;
|
Radix = 16;
|
||||||
Comma = FALSE;
|
Comma = FALSE;
|
||||||
if ((Flags & LONG_TYPE) == 0 && Value < 0) {
|
if ((Flags & LONG_TYPE) == 0 && Value < 0) {
|
||||||
Value = (UINTN)Value;
|
Value = (unsigned int)Value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in New Issue