summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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