Skip to content

Commit

Permalink
x86: fix large Kconfig values on 64-bit
Browse files Browse the repository at this point in the history
Use the special x86 operand modifier 'p' to print the raw value.
This fixes an issue on x86-64 where errors were generated
if a constant larger than INT_MAX was used.

Values larger than UINT_MAX are still unsupported (on any arch).

Fixes: zephyrproject-rtos#22542

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
  • Loading branch information
Andrew Boie committed Feb 12, 2020
1 parent 378d6b1 commit 13b1c69
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion include/toolchain/gcc.h
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,14 @@ do { \
",%B0" \
"\n\t.type\t" #name ",%%object" : : "n"(~(value)))

#elif defined(CONFIG_X86) || defined(CONFIG_ARC) || defined(CONFIG_ARM64)
#elif defined(CONFIG_X86)

#define GEN_ABSOLUTE_SYM(name, value) \
__asm__(".globl\t" #name "\n\t.equ\t" #name \
",%p0" \
"\n\t.type\t" #name ",@object" : : "n"(value))

#elif defined(CONFIG_ARC) || defined(CONFIG_ARM64)

#define GEN_ABSOLUTE_SYM(name, value) \
__asm__(".globl\t" #name "\n\t.equ\t" #name \
Expand Down

0 comments on commit 13b1c69

Please sign in to comment.