diff options
author | Luis Fernandez <Luis.Fernandez@ibm.com> | 2019-04-26 13:23:19 -0500 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2019-05-02 10:52:37 -0500 |
commit | 49d81ec6a770e74cd2a41acb15bcc4efc3434261 (patch) | |
tree | ddd7d55ec681393480b4b317ba229798b8dce1b4 /src/lib/utilmisc.C | |
parent | a6b70d6c06d2b261bbb0a00522088fd5c0d8f395 (diff) | |
download | talos-hostboot-49d81ec6a770e74cd2a41acb15bcc4efc3434261.tar.gz talos-hostboot-49d81ec6a770e74cd2a41acb15bcc4efc3434261.zip |
General Improvement: Get HB standalone + op-build working with GCC8
Fix issue where when compiling with GCC 8, illegal instruction of value
0x0 is placed instead of the expected "blr" instrusction.
Change-Id: I2ff28d5549689d541ea24d102230cbfc22cbbbff
RTC: 163075
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/76650
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Reviewed-by: Nicholas E. Bofferding <bofferdn@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Reviewed-by: Zachary Clark <zach@ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/lib/utilmisc.C')
-rw-r--r-- | src/lib/utilmisc.C | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/lib/utilmisc.C b/src/lib/utilmisc.C index a3771a303..8d53d4c52 100644 --- a/src/lib/utilmisc.C +++ b/src/lib/utilmisc.C @@ -31,17 +31,13 @@ namespace Util bool isSimics() __attribute__((alias("__isSimicsRunning"))); extern "C" bool __isSimicsRunning() NEVER_INLINE; -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wreturn-type" - bool __isSimicsRunning() { - asm volatile("li 3, 0"); + long register r3 asm("r3") = 0; MAGIC_INSTRUCTION(MAGIC_SIMICS_CHECK); + return r3; } -#pragma GCC diagnostic pop - bool isSimicsRunning() { static bool simics = isSimics(); |