summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuis Fernandez <Luis.Fernandez@ibm.com>2019-04-26 13:23:19 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2019-05-02 10:52:37 -0500
commit49d81ec6a770e74cd2a41acb15bcc4efc3434261 (patch)
treeddd7d55ec681393480b4b317ba229798b8dce1b4
parenta6b70d6c06d2b261bbb0a00522088fd5c0d8f395 (diff)
downloadtalos-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>
-rw-r--r--src/include/arch/ppc.H10
-rw-r--r--src/lib/utilmisc.C8
-rw-r--r--src/usr/errl/parser/makefile2
3 files changed, 9 insertions, 11 deletions
diff --git a/src/include/arch/ppc.H b/src/include/arch/ppc.H
index 4d1762db7..81c49eb4f 100644
--- a/src/include/arch/ppc.H
+++ b/src/include/arch/ppc.H
@@ -457,10 +457,12 @@ inline void MAGIC_INSTRUCTION(int _n)
{
register int n = _n;
isync();
- asm volatile("rlwimi %0,%0,0,%1,%2" \
- :: "i" (((n) >> 8) & 0x1f), \
- "i" (((n) >> 4) & 0xf), \
- "i" ((((n) >> 0) & 0xf) | 16)); \
+ long register r3 asm("r3");
+ asm volatile("rlwimi %1,%1,0,%2,%3" \
+ : "=r"(r3) : "i" (((n) >> 8) & 0x1f), \
+ "i" (((n) >> 4) & 0xf), \
+ "i" ((((n) >> 0) & 0xf) | 16), \
+ "r"(r3)); \
}
// Simics components that we can raise log levels for
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();
diff --git a/src/usr/errl/parser/makefile b/src/usr/errl/parser/makefile
index 905e4e6fd..8db2fc0fc 100644
--- a/src/usr/errl/parser/makefile
+++ b/src/usr/errl/parser/makefile
@@ -5,7 +5,7 @@
#
# OpenPOWER HostBoot Project
#
-# Contributors Listed Below - COPYRIGHT 2011,2016
+# Contributors Listed Below - COPYRIGHT 2011,2019
# [+] Google Inc.
# [+] International Business Machines Corp.
#
OpenPOWER on IntegriCloud