From a082c45e0509e02ba7433df23518ee9adec83b65 Mon Sep 17 00:00:00 2001
From: Marcus Comstedt <marcus@mc.pp.se>
Date: Mon, 17 Jul 2017 21:17:35 +0200
Subject: [PATCH] [ppc64] Fix F_NEG_NUMBER

---
 src/code/ppc64.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/code/ppc64.c b/src/code/ppc64.c
index 030d989451..da854ad24a 100644
--- a/src/code/ppc64.c
+++ b/src/code/ppc64.c
@@ -263,7 +263,7 @@ void ppc64_push_global(INT32 arg)
   INCR_SP_REG(sizeof(struct svalue));
 }
 
-void ppc64_push_int(INT32 x, int s)
+void ppc64_push_int(INT64 x, int s)
 {
   LOAD_SP_REG();
 
@@ -280,7 +280,7 @@ void ppc64_push_int(INT32 x, int s)
   }
   STW(0, PPC_REG_PIKE_SP, 4);
   if(x != 0)
-    SET_REG32(0, x);
+    SET_REG64(0, x);
   STD(0, PPC_REG_PIKE_SP, OFFSETOF(svalue,u.integer));
   if(x != MAKE_TYPE_WORD(PIKE_T_INT, s))
     SET_REG32(0, MAKE_TYPE_WORD(PIKE_T_INT, s));
@@ -503,7 +503,7 @@ void ins_f_byte_with_arg(unsigned int a, INT32 b)
      return;
 
    case F_NEG_NUMBER:
-     ppc64_push_int(-b, 0);
+     ppc64_push_int(-(INT64)b, 0);
      return;
 
    case F_CONSTANT:
-- 
GitLab