summaryrefslogtreecommitdiff
path: root/src/arch/x86/boot.c
diff options
context:
space:
mode:
authorPatrick Georgi <pgeorgi@chromium.org>2016-01-22 12:26:52 +0100
committerPatrick Georgi <pgeorgi@google.com>2016-01-23 17:01:44 +0100
commit0302b060b6e4751e4968ce46bf5cdaddfa15911b (patch)
treebaf402ff7ef1c5fd4c5f9da802a5798db16704dd /src/arch/x86/boot.c
parentc7b2b7c67dc8afb52c3dc8e9297e5ed81fa22674 (diff)
arch/x86: remove .intel_syntax
Replace with the more familiar AT&T syntax. Tested by sha1sum(1)ing the object files, and checking the objdump that the code in question was actually compiled. Change-Id: Ie85b8ee5dad1794864c18683427e32f055745221 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-on: https://review.coreboot.org/13132 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'src/arch/x86/boot.c')
-rw-r--r--src/arch/x86/boot.c53
1 files changed, 25 insertions, 28 deletions
diff --git a/src/arch/x86/boot.c b/src/arch/x86/boot.c
index 71b79fe12a..b23e322d6c 100644
--- a/src/arch/x86/boot.c
+++ b/src/arch/x86/boot.c
@@ -60,43 +60,40 @@ static void jmp_payload(void *entry, unsigned long buffer, unsigned long size)
" push %1\n\t"
" push %0\n\t"
- ".intel_syntax noprefix\n\t"
/* use iret to switch to 32-bit code segment */
- " xor rax,rax\n\t"
- " mov ax, ss\n\t"
- " push rax\n\t"
- " mov rax, rsp\n\t"
- " add rax, 8\n\t"
- " push rax\n\t"
+ " xor %%rax,%%rax\n\t"
+ " mov %%ss, %%ax\n\t"
+ " push %%rax\n\t"
+ " mov %%rsp, %%rax\n\t"
+ " add $8, %%rax\n\t"
+ " push %%rax\n\t"
" pushfq\n\t"
- " push 0x10\n\t"
- " lea rax,[rip+3]\n\t"
- " push rax\n\t"
+ " push $0x10\n\t"
+ " lea 3(%%rip), %%rax\n\t"
+ " push %%rax\n\t"
" iretq\n\t"
".code32\n\t"
/* disable paging */
- " mov eax, cr0\n\t"
- " btc eax, 31\n\t"
- " mov cr0, eax\n\t"
+ " mov %%cr0, %%eax\n\t"
+ " btc $31, %%eax\n\t"
+ " mov %%eax, %%cr0\n\t"
/* disable long mode */
- " mov ecx, 0xC0000080\n\t"
+ " mov $0xC0000080, %%ecx\n\t"
" rdmsr\n\t"
- " btc eax, 8\n\t"
+ " btc $8, %%eax\n\t"
" wrmsr\n\t"
- " pop eax\n\t"
- " add esp, 4\n\t"
- " pop ebx\n\t"
- " add esp, 4\n\t"
- " pop ecx\n\t"
-
- " add esp, 4\n\t"
- " pop edx\n\t"
- " add esp, 4\n\t"
- " pop esi\n\t"
- " add esp, 4\n\t"
-
- ".att_syntax prefix\n\t"
+ " pop %%eax\n\t"
+ " add $4, %%esp\n\t"
+ " pop %%ebx\n\t"
+ " add $4, %%esp\n\t"
+ " pop %%ecx\n\t"
+
+ " add $4, %%esp\n\t"
+ " pop %%edx\n\t"
+ " add $4, %%esp\n\t"
+ " pop %%esi\n\t"
+ " add $4, %%esp\n\t"
#endif
/* Save the callee save registers... */