Minor update to move array into function to dead strip better on release builds

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9778 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
AJFISH 2010-01-15 18:33:26 +00:00
parent 235605b5c7
commit 79b9790fb8
1 changed files with 16 additions and 17 deletions

View File

@ -164,20 +164,6 @@ typedef struct {
CHAR8 Char;
} CPSR_CHAR;
CPSR_CHAR gCpsrChar[] = {
{ 31, 'n' },
{ 30, 'z' },
{ 29, 'c' },
{ 28, 'v' },
{ 27, 'q' },
{ 8, 'a' },
{ 7, 'i' },
{ 6, 'f' },
{ 5, 't' },
{ 0, '?' }
};
VOID
CpsrString (
@ -188,10 +174,23 @@ CpsrString (
UINTN Index;
CHAR8 *Str = ReturnStr;
CHAR8 *ModeStr;
CPSR_CHAR CpsrChar[] = {
{ 31, 'n' },
{ 30, 'z' },
{ 29, 'c' },
{ 28, 'v' },
{ 9, 'e' },
{ 8, 'a' },
{ 7, 'i' },
{ 6, 'f' },
{ 5, 't' },
{ 0, '?' }
};
for (Index = 0; gCpsrChar[Index].Bit != 0; Index++, Str++) {
*Str = gCpsrChar[Index].Char;
if ((Cpsr & (1 << gCpsrChar[Index].Bit)) != 0) {
for (Index = 0; CpsrChar[Index].Bit != 0; Index++, Str++) {
*Str = CpsrChar[Index].Char;
if ((Cpsr & (1 << CpsrChar[Index].Bit)) != 0) {
// Concert to upper case if bit is set
*Str &= ~0x20;
}