EdkCompatabilityPkg: Fix build issues with X64 clang

Removed passing VA_LIST and some assembly language compatability issues. Did not fix ReportStatusCode passing VA_LIST (non-ANSI C Code), and some of the assembler was not not ported and int 3 was inserted, as it likely is not needed.

signed-off-by: andrewfish
reviewed-by: lgao4


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12006 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
andrewfish
2011-07-12 02:57:30 +00:00
parent d12bed15b3
commit 271d2c7f99
15 changed files with 264 additions and 367 deletions

View File

@@ -65,14 +65,6 @@ Abstract:
#include EFI_PROTOCOL_DEFINITION (Hii)
#endif
STATIC
CHAR_W *
GetFlagsAndWidth (
IN CHAR_W *Format,
OUT UINTN *Flags,
OUT UINTN *Width,
IN OUT VA_LIST *Marker
);
STATIC
UINTN
@@ -552,6 +544,7 @@ Returns:
UINTN BufferLeft;
UINT64 Value;
EFI_GUID *TmpGUID;
BOOLEAN Done;
//
// Process the format string. Stop if Buffer is over run.
@@ -578,7 +571,64 @@ Returns:
//
// Now it's time to parse what follows after %
//
Format = GetFlagsAndWidth (Format, &Flags, &Width, &Marker);
Flags = 0;
Width = 0;
for (Done = FALSE; !Done;) {
Format++;
switch (*Format) {
case '-':
Flags |= LEFT_JUSTIFY;
break;
case '+':
Flags |= PREFIX_SIGN;
break;
case ' ':
Flags |= PREFIX_BLANK;
break;
case ',':
Flags |= COMMA_TYPE;
break;
case 'L':
case 'l':
Flags |= LONG_TYPE;
break;
case '*':
Width = VA_ARG (Marker, UINTN);
break;
case '0':
Flags |= PREFIX_ZERO;
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
Count = 0;
do {
Count = (Count * 10) +*Format - '0';
Format++;
} while ((*Format >= '0') && (*Format <= '9'));
Format--;
Width = Count;
break;
default:
Done = TRUE;
}
}
switch (*Format) {
case 'p':
//
@@ -725,103 +775,6 @@ Returns:
return &Buffer[Index] - StartOfBuffer;
}
STATIC
CHAR_W *
GetFlagsAndWidth (
IN CHAR_W *Format,
OUT UINTN *Flags,
OUT UINTN *Width,
IN OUT VA_LIST *Marker
)
/*++
Routine Description:
VSPrint worker function that parses flag and width information from the
Format string and returns the next index into the Format string that needs
to be parsed. See file headed for details of Flag and Width.
Arguments:
Format - Current location in the VSPrint format string.
Flags - Returns flags
Width - Returns width of element
Marker - Vararg list that may be paritally consumed and returned.
Returns:
Pointer indexed into the Format string for all the information parsed
by this routine.
--*/
{
UINTN Count;
BOOLEAN Done;
*Flags = 0;
*Width = 0;
for (Done = FALSE; !Done;) {
Format++;
switch (*Format) {
case '-':
*Flags |= LEFT_JUSTIFY;
break;
case '+':
*Flags |= PREFIX_SIGN;
break;
case ' ':
*Flags |= PREFIX_BLANK;
break;
case ',':
*Flags |= COMMA_TYPE;
break;
case 'L':
case 'l':
*Flags |= LONG_TYPE;
break;
case '*':
*Width = VA_ARG (*Marker, UINTN);
break;
case '0':
*Flags |= PREFIX_ZERO;
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
Count = 0;
do {
Count = (Count * 10) +*Format - '0';
Format++;
} while ((*Format >= '0') && (*Format <= '9'));
Format--;
*Width = Count;
break;
default:
Done = TRUE;
}
}
return Format;
}
STATIC
UINTN
GuidToString (