Move ADDR32() hack to arch/x86

It's arch specific, so no need to pollute non-x86 with it.

Change-Id: I99ec76d591789db186e8a33774565e5a04fc4e47
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: https://review.coreboot.org/21392
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
This commit is contained in:
Patrick Georgi 2017-09-04 17:37:31 +02:00 committed by Patrick Georgi
parent faf7a8e859
commit e8741fe954
3 changed files with 9 additions and 7 deletions

View File

@ -18,6 +18,7 @@
#include <compiler.h> #include <compiler.h>
#if !defined(__ASSEMBLER__)
#define DOWNTO8(A) \ #define DOWNTO8(A) \
union { \ union { \
struct { \ struct { \
@ -57,5 +58,12 @@ struct eregs {
uint32_t cs; uint32_t cs;
uint32_t eflags; uint32_t eflags;
}; };
#endif // !ASSEMBLER
#if IS_ENABLED(CONFIG_COMPILER_LLVM_CLANG)
#define ADDR32(opcode) opcode
#else
#define ADDR32(opcode) addr32 opcode
#endif
#endif #endif

View File

@ -37,7 +37,7 @@
#endif #endif
// ADDR32() macro // ADDR32() macro
#include <compiler.h> #include <arch/registers.h>
#if IS_ENABLED(CONFIG_SMM_TSEG) #if IS_ENABLED(CONFIG_SMM_TSEG)
#error "Don't use this file with TSEG." #error "Don't use this file with TSEG."

View File

@ -26,10 +26,4 @@
#define __always_unused __attribute__((unused)) #define __always_unused __attribute__((unused))
#define __must_check __attribute__((warn_unused_result)) #define __must_check __attribute__((warn_unused_result))
#if IS_ENABLED(CONFIG_COMPILER_LLVM_CLANG)
#define ADDR32(opcode) opcode
#else
#define ADDR32(opcode) addr32 opcode
#endif
#endif #endif