Recover full backtraces with generic arithmetic on x86 and x86-64
[sbcl.git] / src / assembly / x86-64 / arith.lisp
index 684d16e..c816bdf 100644 (file)
                 (inst ret)
 
                 DO-STATIC-FUN
+                (inst push rbp-tn)
+                (inst mov rbp-tn rsp-tn)
                 (inst sub rsp-tn (* n-word-bytes 3))
                 (inst mov (make-ea :qword :base rsp-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 rbp-tn)
                 (inst ret))
              #-sb-assembling
              `(define-vop (,name)
   (inst ret)
 
   DO-STATIC-FUN
+  (inst push rbp-tn)
+  (inst mov rbp-tn rsp-tn)
   (inst sub rsp-tn (* n-word-bytes 3))
   (inst mov (make-ea :qword :base rsp-tn
                      :disp (frame-byte-offset
                       :disp (+ nil-value (static-fun-offset 'eql))))
   (load-symbol y t)
   (inst cmp x y)
+  (inst pop rbp-tn)
   (inst ret))
 
 #-sb-assembling
   (inst ret)
 
   DO-STATIC-FUN
+  (inst push rbp-tn)
+  (inst mov rbp-tn rsp-tn)
   (inst sub rsp-tn (* n-word-bytes 3))
   (inst mov (make-ea :qword :base rsp-tn
                      :disp (frame-byte-offset
                       :disp (+ nil-value (static-fun-offset 'two-arg-=))))
   (load-symbol y t)
   (inst cmp x y)
+  (inst pop rbp-tn)
   (inst ret))
 
 #-sb-assembling