Changeset 13299


Ignore:
Timestamp:
Dec 17, 2009, 4:47:42 AM (10 years ago)
Author:
rme
Message:

Add new lap macro double-constant, used for embedding double-float
data into a lap function.

Usage:

(defx86lapfunction foo ()

(movsd (@ (: my-double-float) (% fn)) (% fp0))
...
(single-value-return)
(double-constant my-double-float 123d0))

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/compiler/X86/x86-lapmacros.lisp

    r13067 r13299  
    637637     (box-fixnum ,imm ,imm)
    638638     (subl (% ,imm) (% ,dest))))
     639
     640(defx86lapmacro double-constant (name value)
     641  (multiple-value-bind (high low)
     642      (double-float-bits (float value 1.0d0))
     643    `(progn
     644       (:uuo-section)
     645       (:align 3)
     646       ,name
     647       (:long ,low)
     648       (:long ,high)
     649       (:main-section))))
Note: See TracChangeset for help on using the changeset viewer.