x86: use data32 directive instead of macro for operand-size prefix
PATCH 1/1 x86: use data32 directive instead of macro for operand-size prefix
This file defines 'a32' and 'o32' macros to avoid magic numbers of operand/address-size prefixing.
GAS supports 'data32' and 'addr32' for that purpose.
Signed-off-by Masahiro Yamada <[email protected]>
---
arch/x86/cpu/start16.S | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)
arch/x86/cpu/start16.S +3 -5
@@ -13,8 +13,6 @@ #include <asm/processor-flags.h> #define BOOT_SEG 0xffff0000 /* linear segment of boot code */ -#define a32 .byte 0x67; -#define o32 .byte 0x66; .section .start16, "ax" .code16
@@ -33,8 +31,8 @@ start16: wbinvd /* load the temporary Global Descriptor Table */ -o32 cs lidt idt_ptr -o32 cs lgdt gdt_ptr +data32 cs lidt idt_ptr +data32 cs lgdt gdt_ptr /* Now, we enter protected mode */ movl %cr0, %eax
@@ -49,7 +47,7 @@ ff: movw $code32start, %ax movw %ax, %bp movl %ecx, %eax -o32 cs ljmp *(%bp) +data32 cs ljmp *(%bp) /* 48-bit far pointer */ code32start:
Signature · 1 line
2.17.1
PATCH 1/1 x86: use data32 directive instead of macro for operand-size prefix
Quoted 4 lines · Masahiro Yamada
This file defines 'a32' and 'o32' macros to avoid magic numbers of operand/address-size prefixing.
Quoted 8 lines
GAS supports 'data32' and 'addr32' for that purpose.
Signed-off-by Masahiro Yamada <[email protected]>---
arch/x86/cpu/start16.S | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)
Reviewed-by Bin Meng <[email protected]>
Tested-by Bin Meng <[email protected]>
PATCH 1/1 x86: use data32 directive instead of macro for operand-size prefix
Quoted 11 lines · Bin Meng
Quoted 9 lines · Masahiro Yamada
This file defines 'a32' and 'o32' macros to avoid magic numbers of operand/address-size prefixing.
GAS supports 'data32' and 'addr32' for that purpose.
Signed-off-by Masahiro Yamada <[email protected]>---
Quoted 6 lines
Quoted 3 lines
arch/x86/cpu/start16.S | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)Reviewed-by Bin Meng <[email protected]>Tested-by Bin Meng <[email protected]>
applied to u-boot-x86, thanks!