<p>Patrick Georgi has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/21392">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">Move ADDR32() hack to arch/x86<br><br>It's arch specific, so no need to pollute non-x86 with it.<br><br>Change-Id: I99ec76d591789db186e8a33774565e5a04fc4e47<br>Signed-off-by: Patrick Georgi <pgeorgi@chromium.org><br>---<br>M src/arch/x86/include/arch/registers.h<br>M src/cpu/x86/smm/smmrelocate.S<br>M src/include/compiler.h<br>3 files changed, 9 insertions(+), 7 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/coreboot refs/changes/92/21392/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/src/arch/x86/include/arch/registers.h b/src/arch/x86/include/arch/registers.h<br>index 76fda28..9a618f4 100644<br>--- a/src/arch/x86/include/arch/registers.h<br>+++ b/src/arch/x86/include/arch/registers.h<br>@@ -18,6 +18,7 @@<br> <br> #include <compiler.h><br> <br>+#if !defined(__ASSEMBLER__)<br> #define DOWNTO8(A) \<br>  union { \<br>             struct { \<br>@@ -57,5 +58,12 @@<br>        uint32_t cs;<br>  uint32_t eflags;<br> };<br>+#endif // !ASSEMBLER<br>+<br>+#if IS_ENABLED(CONFIG_COMPILER_LLVM_CLANG)<br>+#define ADDR32(opcode) opcode<br>+#else<br>+#define ADDR32(opcode) addr32 opcode<br>+#endif<br> <br> #endif<br>diff --git a/src/cpu/x86/smm/smmrelocate.S b/src/cpu/x86/smm/smmrelocate.S<br>index b3be51d..230c78d 100644<br>--- a/src/cpu/x86/smm/smmrelocate.S<br>+++ b/src/cpu/x86/smm/smmrelocate.S<br>@@ -37,7 +37,7 @@<br> #endif<br> <br> // ADDR32() macro<br>-#include <compiler.h><br>+#include <arch/registers.h><br> <br> #if IS_ENABLED(CONFIG_SMM_TSEG)<br> #error "Don't use this file with TSEG."<br>diff --git a/src/include/compiler.h b/src/include/compiler.h<br>index 268064d..a830239 100644<br>--- a/src/include/compiler.h<br>+++ b/src/include/compiler.h<br>@@ -26,10 +26,4 @@<br> #define __always_unused __attribute__((unused))<br> #define __must_check __attribute__((warn_unused_result))<br> <br>-#if IS_ENABLED(CONFIG_COMPILER_LLVM_CLANG)<br>-#define ADDR32(opcode) opcode<br>-#else<br>-#define ADDR32(opcode) addr32 opcode<br>-#endif<br>-<br> #endif<br></pre><p>To view, visit <a href="https://review.coreboot.org/21392">change 21392</a>. To unsubscribe, visit <a href="https://review.coreboot.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://review.coreboot.org/21392"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: coreboot </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I99ec76d591789db186e8a33774565e5a04fc4e47 </div>
<div style="display:none"> Gerrit-Change-Number: 21392 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Patrick Georgi <pgeorgi@google.com> </div>