Commit 892fe1bc authored by Raymond Toy's avatar Raymond Toy
Browse files

Address #156: Add two-arg-<= and two-arg->=

This brings us more in line with sparc and ppc.  Also, x86 didn't
define static functions for `two-arg-<`, `two-arg->`, `two-arg-=`, and
`two-arg-/=`.

Also add `generic-<=` and `generic->=` for consistency with sparc and
ppc.

Don't know why these aren't defined for x86, but let's add them for
consistency with sparc and ppc.
parent 80f89a62
Loading
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -214,7 +214,9 @@
); eval-when
); eval-when


(define-cond-assem-rtn generic-< < two-arg-< :l)
(define-cond-assem-rtn generic-< < two-arg-< :l)
(define-cond-assem-rtn generic-<= <= two-arg-<= :le)
(define-cond-assem-rtn generic-> > two-arg-> :g)
(define-cond-assem-rtn generic-> > two-arg-> :g)
(define-cond-assem-rtn generic->= >= two-arg->= :ge)


(define-assembly-routine (generic-eql
(define-assembly-routine (generic-eql
			  (:cost 10)
			  (:cost 10)
+8 −1
Original line number Original line Diff line number Diff line
@@ -1506,6 +1506,13 @@


(define-static-function two-arg-/ (x y) :translate /)
(define-static-function two-arg-/ (x y) :translate /)


(define-static-function two-arg-< (x y) :translate <)
(define-static-function two-arg-<= (x y) :translate <=)
(define-static-function two-arg-> (x y) :translate >)
(define-static-function two-arg->= (x y) :translate >=)
(define-static-function two-arg-= (x y) :translate =)
(define-static-function two-arg-/= (x y) :translate /=)

(define-static-function two-arg-gcd (x y) :translate gcd)
(define-static-function two-arg-gcd (x y) :translate gcd)
(define-static-function two-arg-lcm (x y) :translate lcm)
(define-static-function two-arg-lcm (x y) :translate lcm)


+4 −0
Original line number Original line Diff line number Diff line
@@ -395,10 +395,14 @@
      *static-blue-bag*		; Must be last or change C code
      *static-blue-bag*		; Must be last or change C code
      ))
      ))


;; FIXME: This should be reordered to match more closely the order
;; used for sparc and ppc.  However, I (rtoy) think that requires a
;; cross-compile.
(defparameter static-functions
(defparameter static-functions
  '(length
  '(length
    two-arg-+ two-arg-- two-arg-* two-arg-/ two-arg-< two-arg-> two-arg-= eql
    two-arg-+ two-arg-- two-arg-* two-arg-/ two-arg-< two-arg-> two-arg-= eql
    %negate two-arg-and two-arg-ior two-arg-xor two-arg-gcd two-arg-lcm
    %negate two-arg-and two-arg-ior two-arg-xor two-arg-gcd two-arg-lcm
    two-arg-<= two-arg->= two-arg-/=
    ))
    ))


;;;
;;;