summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/arch/x86/include/arch/registers.h8
-rw-r--r--src/cpu/x86/smm/smmrelocate.S2
-rw-r--r--src/include/compiler.h6
3 files changed, 9 insertions, 7 deletions
diff --git a/src/arch/x86/include/arch/registers.h b/src/arch/x86/include/arch/registers.h
index 76fda2851d..9a618f4870 100644
--- a/src/arch/x86/include/arch/registers.h
+++ b/src/arch/x86/include/arch/registers.h
@@ -18,6 +18,7 @@
#include <compiler.h>
+#if !defined(__ASSEMBLER__)
#define DOWNTO8(A) \
union { \
struct { \
@@ -57,5 +58,12 @@ struct eregs {
uint32_t cs;
uint32_t eflags;
};
+#endif // !ASSEMBLER
+
+#if IS_ENABLED(CONFIG_COMPILER_LLVM_CLANG)
+#define ADDR32(opcode) opcode
+#else
+#define ADDR32(opcode) addr32 opcode
+#endif
#endif
diff --git a/src/cpu/x86/smm/smmrelocate.S b/src/cpu/x86/smm/smmrelocate.S
index b3be51d9c1..230c78d079 100644
--- a/src/cpu/x86/smm/smmrelocate.S
+++ b/src/cpu/x86/smm/smmrelocate.S
@@ -37,7 +37,7 @@
#endif
// ADDR32() macro
-#include <compiler.h>
+#include <arch/registers.h>
#if IS_ENABLED(CONFIG_SMM_TSEG)
#error "Don't use this file with TSEG."
diff --git a/src/include/compiler.h b/src/include/compiler.h
index 268064d0c2..a830239009 100644
--- a/src/include/compiler.h
+++ b/src/include/compiler.h
@@ -26,10 +26,4 @@
#define __always_unused __attribute__((unused))
#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