* [U-Boot] [PATCH] x86: use data32 directive instead of macro for operand-size prefix
@ 2019-12-03 5:31 Masahiro Yamada
2019-12-08 10:43 ` Bin Meng
0 siblings, 1 reply; 4+ messages in thread
From: Masahiro Yamada @ 2019-12-03 5:31 UTC (permalink / raw)
To: u-boot
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 <masahiroy@kernel.org>
---
arch/x86/cpu/start16.S | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/arch/x86/cpu/start16.S b/arch/x86/cpu/start16.S
index 474efe4df5f4..bcabd76741ef 100644
--- a/arch/x86/cpu/start16.S
+++ b/arch/x86/cpu/start16.S
@@ -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:
--
2.17.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] x86: use data32 directive instead of macro for operand-size prefix
2019-12-03 5:31 [U-Boot] [PATCH] x86: use data32 directive instead of macro for operand-size prefix Masahiro Yamada
@ 2019-12-08 10:43 ` Bin Meng
2019-12-08 11:08 ` Bin Meng
0 siblings, 1 reply; 4+ messages in thread
From: Bin Meng @ 2019-12-08 10:43 UTC (permalink / raw)
To: u-boot
On Tue, Dec 3, 2019 at 1:32 PM Masahiro Yamada <masahiroy@kernel.org> wrote:
>
> 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 <masahiroy@kernel.org>
> ---
>
> arch/x86/cpu/start16.S | 8 +++-----
> 1 file changed, 3 insertions(+), 5 deletions(-)
>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] x86: use data32 directive instead of macro for operand-size prefix
2019-12-08 10:43 ` Bin Meng
@ 2019-12-08 11:08 ` Bin Meng
0 siblings, 0 replies; 4+ messages in thread
From: Bin Meng @ 2019-12-08 11:08 UTC (permalink / raw)
To: u-boot
On Sun, Dec 8, 2019 at 6:43 PM Bin Meng <bmeng.cn@gmail.com> wrote:
>
> On Tue, Dec 3, 2019 at 1:32 PM Masahiro Yamada <masahiroy@kernel.org> wrote:
> >
> > 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 <masahiroy@kernel.org>
> > ---
> >
> > arch/x86/cpu/start16.S | 8 +++-----
> > 1 file changed, 3 insertions(+), 5 deletions(-)
> >
>
> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
> Tested-by: Bin Meng <bmeng.cn@gmail.com>
applied to u-boot-x86, thanks!
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH] x86: use data32 directive instead of macro for operand-size prefix
@ 2019-12-03 5:20 Masahiro Yamada
0 siblings, 0 replies; 4+ messages in thread
From: Masahiro Yamada @ 2019-12-03 5:20 UTC (permalink / raw)
To: u-boot
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 <masahiroy@kernel.org>
---
arch/x86/cpu/start16.S | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/arch/x86/cpu/start16.S b/arch/x86/cpu/start16.S
index 474efe4df5f4..bcabd76741ef 100644
--- a/arch/x86/cpu/start16.S
+++ b/arch/x86/cpu/start16.S
@@ -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:
--
2.17.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-12-08 11:08 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-03 5:31 [U-Boot] [PATCH] x86: use data32 directive instead of macro for operand-size prefix Masahiro Yamada
2019-12-08 10:43 ` Bin Meng
2019-12-08 11:08 ` Bin Meng
-- strict thread matches above, loose matches on Subject: below --
2019-12-03 5:20 [U-Boot] " Masahiro Yamada
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.