mirror of https://github.com/acidanthera/audk.git
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:
parent
235605b5c7
commit
79b9790fb8
|
@ -164,20 +164,6 @@ typedef struct {
|
||||||
CHAR8 Char;
|
CHAR8 Char;
|
||||||
} CPSR_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
|
VOID
|
||||||
CpsrString (
|
CpsrString (
|
||||||
|
@ -188,10 +174,23 @@ CpsrString (
|
||||||
UINTN Index;
|
UINTN Index;
|
||||||
CHAR8 *Str = ReturnStr;
|
CHAR8 *Str = ReturnStr;
|
||||||
CHAR8 *ModeStr;
|
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++) {
|
for (Index = 0; CpsrChar[Index].Bit != 0; Index++, Str++) {
|
||||||
*Str = gCpsrChar[Index].Char;
|
*Str = CpsrChar[Index].Char;
|
||||||
if ((Cpsr & (1 << gCpsrChar[Index].Bit)) != 0) {
|
if ((Cpsr & (1 << CpsrChar[Index].Bit)) != 0) {
|
||||||
// Concert to upper case if bit is set
|
// Concert to upper case if bit is set
|
||||||
*Str &= ~0x20;
|
*Str &= ~0x20;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue