Changeset 5966


Ignore:
Timestamp:
Feb 28, 2007, 6:04:25 AM (18 years ago)
Author:
Gary Byers
Message:

In %fixnum-truncate, use -8(sp) rather than %rbp; trust
callback_for_interrupt() to preserve it.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ccl/level-0/X86/x86-numbers.lisp

    r4399 r5966  
    111111
    112112
    113 ;;; We'll get a SIGFPE if divisor is 0.  We need a 3rd imm reg here.
     113;;; We'll get a SIGFPE if divisor is 0.
     114;;; Don't use %rbp.  Trust callback_for_interrupt() to preserve
     115;;; the word below the stack pointer
    114116(defx86lapfunction %fixnum-truncate ((dividend arg_y) (divisor arg_z))
     117  (unbox-fixnum divisor imm0)
     118  (movq (% imm0) (@ -8 (% rsp)))
    115119  (unbox-fixnum dividend imm0)
    116120  (cqto)                                ; imm1 := sign_extend(imm0)
    117   (pushq (% rbp))
    118   (unbox-fixnum divisor rbp)
    119   (idivq (% rbp))
    120   (popq (% rbp))
     121  (idivq (@ -8 (% rsp)))
    121122  (movq (% rsp) (% temp0))
    122123  (box-fixnum imm1 arg_y)
Note: See TracChangeset for help on using the changeset viewer.