Browse Source

Do not add 8 to NIL values of get_caller_addr

git-svn-id: trunk@22370 -
pierre 13 years ago
parent
commit
66b9617ba7
1 changed files with 5 additions and 1 deletions
  1. 5 1
      rtl/sparc/sparc.inc

+ 5 - 1
rtl/sparc/sparc.inc

@@ -87,7 +87,11 @@ function get_caller_addr(framebp:pointer;addr:pointer=nil):pointer;assembler;nos
     { flush register windows, so they are stored in the stack }
     ta      3
     ld [%o0+60],%o0
-    { add 8 to skip jmpl and delay slot }
+    { check if new %o0 register is zero }
+    subcc   %o0,0,%o0
+    be      .Lframezero
+    nop
+    { if not zero, add 8 to skip jmpl and delay slot }
     add %o0,8,%o0
 .Lframezero:
   end;