Recover full backtraces with generic arithmetic on x86 and x86-64
[sbcl.git] / src / assembly / x86 / arith.lisp
index 53ba95e..52b3efc 100644 (file)
                 (inst ret)
 
                 DO-STATIC-FUN
+                (inst push ebp-tn)
+                (inst mov ebp-tn esp-tn)
                 (inst sub esp-tn (fixnumize 3))
                 (inst mov (make-ea :dword :base esp-tn
                                    :disp (frame-byte-offset
                     (:l `((inst mov y (1+ nil-value))
                           (inst cmp y x)))
                     (:g `((inst cmp x (1+ nil-value)))))
+                (inst pop ebp-tn)
                 (inst ret))
              #-sb-assembling
              `(define-vop (,name)
   (inst cmp x y)
   (inst jmp :e RET)
 
+  (inst push ebp-tn)
+  (inst mov ebp-tn esp-tn)
   (inst sub esp-tn (fixnumize 3))
   (inst mov (make-ea :dword :base esp-tn
                      :disp (frame-byte-offset
                       :disp (+ nil-value (static-fun-offset 'eql))))
   (load-symbol y t)
   (inst cmp x y)
+  (inst pop ebp-tn)
   (inst ret))
 
 #-sb-assembling
   (inst ret)
 
   DO-STATIC-FUN
+  (inst push ebp-tn)
+  (inst mov ebp-tn esp-tn)
   (inst sub esp-tn (fixnumize 3))
   (inst mov (make-ea :dword :base esp-tn
                      :disp (frame-byte-offset
                       :disp (+ nil-value (static-fun-offset 'two-arg-=))))
   (load-symbol y t)
   (inst cmp x y)
+  (inst pop ebp-tn)
   (inst ret))
 
 #-sb-assembling