Browse Source

PPC: Fix interpreter state setup in callbacks.

Mike Pall 13 years ago
parent
commit
c0aaf271c8
1 changed files with 2 additions and 0 deletions
  1. 2 0
      src/vm_ppc.dasc

+ 2 - 0
src/vm_ppc.dasc

@@ -2601,8 +2601,10 @@ static void build_subroutines(BuildCtx *ctx)
   |     li ZERO, 0
   |   mr L, CRET1
   |     stw TMP3, TMPD
+  |     lus TMP0, 0x4338		// Hiword of 2^52 + 2^51 (double)
   |  lwz LFUNC:RB, FRAME_FUNC(BASE)
   |     ori TMP3, TMP3, 0x0004		// TONUM = 2^52 + 2^51 + 2^31 (float).
+  |     stw TMP0, TONUM_HI
   |     li TISNIL, LJ_TNIL
   |    li_vmstate INTERP
   |     lfs TOBIT, TMPD