[FREELDR/x64] Change syntax to be compatible with GAS x64

This commit is contained in:
Hervé Poussineau 2021-01-28 22:57:08 +01:00
parent ec7d874c18
commit d2f73877b7
2 changed files with 6 additions and 6 deletions

View file

@ -34,7 +34,7 @@ RealEntryPoint:
jmp qword ptr [ContinueAddress]
ContinueAddress:
.quad offset FrldrStartup
.quad FrldrStartup
FrldrStartup:
@ -184,7 +184,7 @@ SwitchToReal:
jmp fword ptr [jumpvector]
jumpvector:
.long offset SwitchToRealCompSegment
.long SwitchToRealCompSegment
.word CMODE_CS
SwitchToRealCompSegment:
@ -222,7 +222,7 @@ __fastfail:
// void __lgdt(void *Source<rcx>);
PUBLIC __lgdt
__lgdt:
lgdt fword ptr [rcx]
lgdt cs:[rcx]
ret
// void __ltr(unsigned short Source<rcx>);
@ -234,7 +234,7 @@ __ltr:
// void _sgdt(void *Destination<rcx>);
PUBLIC __sgdt
__sgdt:
sgdt fword ptr [rcx]
sgdt cs:[rcx]
ret

View file

@ -67,7 +67,7 @@ Msg_LongModeSupported:
call writestr
/* Load the GDT */
lgdt fword ptr [gdtptr]
lgdt cs:[gdtptr]
/* Build the startup page tables */
call BuildPageTables
@ -265,7 +265,7 @@ RealModeEntryPoint:
mov cr0, eax
/* Clear prefetch queue & correct CS */
ljmp16 0, offset InRealMode
ljmp16 0, InRealMode
InRealMode: