diff options
author | Patrick Georgi <pgeorgi@chromium.org> | 2016-01-22 12:26:52 +0100 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2016-01-23 17:01:44 +0100 |
commit | 0302b060b6e4751e4968ce46bf5cdaddfa15911b (patch) | |
tree | baf402ff7ef1c5fd4c5f9da802a5798db16704dd /src/arch/x86/c_start.S | |
parent | c7b2b7c67dc8afb52c3dc8e9297e5ed81fa22674 (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/c_start.S')
-rw-r--r-- | src/arch/x86/c_start.S | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/src/arch/x86/c_start.S b/src/arch/x86/c_start.S index 124bfa84bf..65ab0be042 100644 --- a/src/arch/x86/c_start.S +++ b/src/arch/x86/c_start.S @@ -400,29 +400,26 @@ _idt_end: #ifdef __x86_64__ SetCodeSelector: -.intel_syntax noprefix - # save rsp because iret will align it to a 16 byte boundary - mov rdx, rsp + mov %rsp, %rdx # use iret to jump to a 64-bit offset in a new code segment # iret will pop cs:rip, flags, then ss:rsp - mov ax, ss # need to push ss.. - push rax # push ss instuction not valid in x64 mode, so use ax - push rsp + mov %ss, %ax # need to push ss.. + push %rax # push ss instuction not valid in x64 mode, so use ax + push %rsp pushfq - push rcx # cx is code segment selector from caller - mov rax, offset setCodeSelectorLongJump - push rax + push %rcx # cx is code segment selector from caller + mov $setCodeSelectorLongJump, %rax + push %rax # the iret will continue at next instruction, with the new cs value loaded iretq setCodeSelectorLongJump: # restore rsp, it might not have been 16-byte aligned on entry - mov rsp, rdx + mov %rdx, %rsp ret -.att_syntax prefix .previous .code64 |