Notes:


-  Argument order is not guaranteed, as it is in CL.


- Form is

  (excl::ll <op> [args])

where <op> is a keyword described below.


- Most ops generate a "true" cc, i.e. if an ll form is used as 

a test in a cond, if, when, unless, etc form, the result will

always be true.  Exceptions are the test ops like :<, :<u,

etc, and the *carry and *overflow ops - for example one can do 


       (if (ll :+-carry (ll :aref-nat x i) ov-accum low-accum)

  (setq ov-accum #mi.1)

(setq ov-accum 0))


which will set the low-accum and also store 1 or 0 into ov-accum

based on whether the addition overflowed or not.

 

- A function marked as ll-fcn-immed will respond to a request for

an unboxed compilation, if the node is of the right type.  It is

the reaponsibility of the programmer to ensure that immed types

are matched.


- The :aref-*/:aset-* ll functions are neither offset nor indexed.

The address must be calculated based on the offset to the first

data slot, and index must be shifted appropriately for the width

of the element types.


- A couple of useful machine-dependent values:


  #.(sys::mdparam 'comp::md-svector-data0-norm)

     offset from a tagged short simple-vector to the 0th data slot

     of the array  (for double-float, complex double-float, and

     excl::foreign arrays on 32-bit lisps, add 4 as well).


  #.(sys::mdparam 'comp::md-lvector-data0-norm)

     offset from a tagged long simple-vector to the 0th data slot

     of the array.


  Typical usage might be:


   (let ((pointer (ll :+ x (ll :fixnum-to-mi

                               #.(sys::mdparam 'comp::md-lvector-data0-norm)))))

     (setq res (ll :aref-ulong pointer i))

     (setq i (ll :+ i (ll :fixnum-to-mi 1))))


Items marked with * below are only available after loading an extra

module into the lisp (or a "dcl" lisp).


=====


ll-fcn :flush-windows ()

   Flush the register windows on sparc; nop on all

   other architectures


ll-fcn :interrupt-check ()

   Force an interrupt check


ll-fcn :+-carry (arg1 arg2 &optional out) [x86, amd64 only]

ll-fcn :+-no-carry (arg1 arg2 &optional out) [x86, amd64 only]

ll-fcn :+-no-overflow (arg1 arg2 &optional out)

ll-fcn :+-overflow (arg1 arg2 &optional out)

ll-fcn :--carry (arg1 arg2 &optional out) [x86, amd64 only]

ll-fcn :--no-carry (arg1 arg2 &optional out) [x86, amd64 only]

ll-fcn :--no-overflow (arg1 arg2 &optional out)

ll-fcn :--overflow (arg1 arg2 &optional out)

  Add or subtract arg1 and arg2, and generate truth or falsehood

  based on whether the operation overflowed or caused a carry bit.

  If out is given, result of operation is stored there.


ll-fcn :bit-and (arg1 arg2)

ll-fcn :bit-eqv (arg1 arg2)

  True if bitwise operation is t (non-zero) or nil (zero)


ll-fcn :double-float-result (arg1)

  Boxes an immed double-float arg1


ll-fcn-immed :double-to-single (arg1)

  Converts an immed double-float arg1 to immed single-float


ll-fcn-immed :fixnum-to-double (arg1)

ll-fcn-immed :fixnum-to-single (arg1)

  Converts fixnum to immed float of desired size


ll-fcn :funcall (fcn &rest args)

ll-fcn :funcall-symbol (sym &rest args)

  Funcalls a function-object or a symbol efficiently, with args


ll-fcn :get-uwp-tag ()

  Gets current thrown-to-tag (only valid in unwind-protect cleanup)

ll-fcn :get-uwp-vals ()

  Gets closed multiple-values-vector (only valid in unwind-protect cleanup)


ll-fcn :glob-c-value (name)

ll-fcn :glob-c-value-address (name)

ll-fcn :glob-lvalue (name)

ll-fcn :glob-lvalue-address (name)

ll-fcn :glob-symbol (name)

ll-fcn :glob-symbol-address (name)

  Gets the value or address in the global-table of the c-value/lvalue/symbol

  named name.


ll-fcn :global (slot symbol)

 Access a symbol.  slot can be nil or :nocheck or :foreign-address,

 or one of 'symbol-value 'symbol-function, etc.


ll-fcn :integer-to-mi (int)

 Convert an integer to machine-integer


ll-fcn :open-mv (mvvec)

 open mvvec as multiple-values and put into place for a return.

ll-fcn :close-mv

 close multiple-values and return an mvvec


ll-fcn :register (name)

ll-fcn-immed :register (name)

  Access the register named name.  Immed access only occurs for values

for name: :retval-float-register or :retval-single-float-register


ll-fcn :set-glob-c-value (name value)

ll-fcn :set-glob-lvalue (name value)

ll-fcn :set-glob-symbol (name value)

  Stores the value into the global-table of the c-value/lvalue/symbol

  named name.


ll-fcn :set-register (name value)

 Set the register named name to value


ll-fcn :set-symbol-value (name value)

 Store value into symbol-value slot of name, but without using

 setf-protect.


ll-fcn :single-float-result (arg1)

  Boxes an immed single-float arg1


ll-fcn-immed :single-to-double (arg1)

  Converts an immed single-float arg1 to immed double-float


ll-fcn :throw (&optional :closed-mv first-value)

 Throw. values are in open mv unless first arg is :closed-mv


ll-fcn :mi-to-fixnum (mi)

  Convert machine integer mi to fixnum by shifting only

ll-fcn :fixnum-to-mi (fix)

  Convert fixnum to machine integer via arithmetic shift.  If

  fix is a constant integer then that value is what is used,

  even if we are compiling in open lisp code.


ll-fcn :unbind-to (bnp)

 Unbind specials until the bindstack-pointer is the same as bnp.


ll-fcn :unboxed-double-to-fixnum (arg1)

ll-fcn :unboxed-single-to-fixnum (arg1)

 Convert immed double-float/single-float arg1 to a fixnum


ll-fcn :% (arg1 arg2)   [mod/rem]

ll-fcn :%u (arg1 arg2)  [unsigned mod/rem]

ll-fcn :* (arg1 arg2)   [multiply]

ll-fcn :+ (arg1 arg2)   [add]

ll-fcn :- (arg1 arg2)   [subtract]

ll-fcn :/ (arg1 arg2)   [divide]

ll-fcn :/u (arg1 arg2)  [unsigned divide]

ll-fcn :< (arg1 arg2)   [less-than]

ll-fcn :<= (arg1 arg2)  [less-than-or-equal]

ll-fcn :<=u (arg1 arg2) [unsigned less-than-or-equal]

ll-fcn :<=u-mi (arg1 arg2) [unsigned less-than-or-equal (machine-integer)]

ll-fcn :<u (arg1 arg2)  [unsigned less-than]

ll-fcn :<u-mi (arg1 arg2)  [unsigned less-than (machine-integer)]

ll-fcn := (arg1 arg2)   [unsigned equal]

ll-fcn :> (arg1 arg2)   [greater-than]

ll-fcn :>= (arg1 arg2)  [greater-than-or-equal]

ll-fcn :>=u (arg1 arg2) [unsigned greater-than-or-equal]

ll-fcn :>=u-mi (arg1 arg2) [unsigned greater-than-or-equal (machine-integer)]

ll-fcn :>u (arg1 arg2)  [unsigned greater-than]

ll-fcn :>u-mi (arg1 arg2)  [unsigned greater-than (machine-integer)]

ll-fcn :u* (arg1 arg2)  [unsigned multiply]


Each of the following access memory based on a pointer and

an index.


ll-fcn :aref-3byte (pointer index)

  The three upper bytes of a little-endian, or the three

  lower bytes of a big-endian

ll-fcn :aref-bigit (pointer index)

  Bignum-digit, unsigned (16 bits in a 32-bit lisp, 32-bits

  in a 64-bit lisp)

ll-fcn :aref-bit (pointer index)

  1 bit

ll-fcn :aref-lisp (pointer index)

  Lisp value (similar to :aref-nat)

ll-fcn :aref-long (pointer index)

  32-bit signed

ll-fcn :aref-long64 (pointer index)

  64-bit signed

ll-fcn :aref-mi (pointer index)

ll-fcn-immed :aref-mi (pointer index)

  32/64-bit signed (possibly unboxed)

ll-fcn :aref-nat (pointer index)

  32/64-bit signed

ll-fcn :aref-nybble (pointer index)

  4-bit unsigned

ll-fcn :aref-quad (pointer index)

ll-fcn-immed :aref-quad (pointer index)

  64-bit signed (possibly unboxed)

ll-fcn :aref-quad-unaligned (pointer index)

ll-fcn-immed :aref-quad-unaligned (pointer index)

  64-bit signed (possibly boxed, but without alignment traps)

ll-fcn :aref-sbyte (pointer index)

  signed 1-byte

ll-fcn :aref-sing (pointer index)

ll-fcn-immed :aref-sing (pointer index)

  single-float (possibly unboxed)

ll-fcn :aref-sword (pointer index)

  16-bit signed

ll-fcn :aref-ubyte (pointer index)

  8-bit unsigned

ll-fcn :aref-ulong (pointer index)

  32-bit unsigned

ll-fcn :aref-unat (pointer index)

  32/64-bit unsigned

ll-fcn :aref-uword (pointer index)

  16-bit signed


Each of the following store value into memory based on a

pointer and an index.


ll-fcn :aset-3byte (pointer index value)

  The three upper bytes of a little-endian, or the three

  lower bytes of a big-endian

ll-fcn :aset-bigit (pointer index value)

  Bignum-digit, unsigned (16 bits in a 32-bit lisp, 32-bits

  in a 64-bit lisp)

ll-fcn :aset-byte (pointer index value)

  8-bit unsigned

ll-fcn :aset-lisp (pointer index value)

  Lisp value (similar to :aref-nat, but gsgc-set-protect occurs)

ll-fcn :aset-long (pointer index value)

 32-bit (signed or unsigned)

ll-fcn :aset-long64 (pointer index value)

 64-bit signed

ll-fcn :aset-mi (pointer index value)

 32/64-bit signed (unboxed)

ll-fcn :aset-nat (pointer index value)

 32/64-bit signed

ll-fcn :aset-nybble (pointer index value)

 4-bit

ll-fcn :aset-quad (pointer index value)

 64-bit

* ll-fcn :aset-quad-unaligned (pointer index value)

 64-bit (but without alignment traps)

ll-fcn :aset-sing (pointer index value)

 single-float

ll-fcn :aset-unat (pointer index value)

 32/64-bit unsigned

ll-fcn :aset-word (pointer index value)

 16-bit 


ll-fcn :asr (val shift)

 shift val right arithmetically shift positions


ll fcn :current-thread

 Return the current thread


ll-fcn :double-long-* (arg1 arg2)

ll-fcn :double-long-u* (arg1 arg2)

 multiply 32 x 32 => 64 bit, or 64 x 64 => 128 bit, returned

 in two values, least significant is first value retrned.


ll-fcn :double-u/% (arg1 arg2)

 unsigned divide arg1 by arg2, arg1 is 64/128 bits, arg2 is 32/64,

 result is 32/64 bits

 

ll-fcn :extend (arg1) [alpha only]

  sign extend from 4 bytes to 8 bytes

ll-fcn :logand (arg1 arg2)

ll-fcn :logandc1 (arg1 arg2)

ll-fcn :logandc2 (arg1 arg2)

ll-fcn :logeqv (arg1 arg2)

ll-fcn :logior (arg1 arg2)

ll-fcn :lognand (arg1 arg2)

ll-fcn :lognor (arg1 arg2)

ll-fcn :lognot (arg1)

ll-fcn :logorc1 (arg1 arg2)

ll-fcn :logorc2 (arg1 arg2)

ll-fcn :logxor (arg1 arg2)

 Perform the bitwise operation - return result


ll-fcn :lsl (val shift)

ll-fcn :lsr (val shift)

 logical shift val left or right shift bits


ll-fcn :svector-size (svector)

 Return the size of the short svector


ll-fcn :typecheck (typename val)

 true if val is of type typename


ll-fcn :typecode (val)

 returns the typecode of val


ll-fcn :typetag (val)

 returns the type-tag of val. 


Runtime only:



* ll-fcn :argshift

* ll-fcn :oparams-to-regs

* ll-fcn :call-immed-args

* ll-fcn :cache-line-flush

* ll-fcn :c-call

* ll-fcn :c-call-d

* ll-fcn-immed :c-call-d

* ll-fcn :c-call-dd

* ll-fcn-immed :c-call-dd

* ll-fcn :c-call-di

* ll-fcn-immed :c-call-di

* ll-fcn :c-call-leaf

* ll-fcn :c-call-minimal

* ll-fcn :c-funcall

* ll-fcn :c-funcall-no-link

* ll-fcn :coparam-address

* ll-fcn :coparams-to-float-regs

* ll-fcn :coparams-to-regs

* ll-fcn :copyinstack

* ll-fcn :c-variable 

* ll-fcn :c-variable-address

* ll-fcn :int-call-set-args

* ll-fcn :funcall-set

* ll-fcn :funcall-set-x

* ll-fcn :flush-args-to-stack

* ll-fcn :flush-cargs-to-stack

* ll-fcn :get-space-id

* ll-fcn :int-call

* ll-fcn :label-value

* ll-fcn :lsrq  [alpha only]

* ll-fcn :oparam-address

* ll-fcn :propagate-env

* ll-fcn :param

* ll-fcn :param-address

* ll-fcn :put-bit [ rs6000 only, obsolete]

* ll-fcn :qint-call

* ll-fcn :icache-line-flush

* ll-fcn :restart-function

* ll-fcn :resume-function

* ll-fcn :resume-function-x

* ll-fcn :return-from-throw

* ll-fcn :return-value-count

* ll-fcn :return-value-count-x

* ll-fcn :set-c-variable

* ll-fcn :set-clink-from-c

* ll-fcn :set-clink-from-c-leaf

* ll-fcn :set-ret-double-float-register

* ll-fcn :set-ret-single-float-register

* ll-fcn :set-stack-frame-retaddr

* ll-fcn :start-clink

* ll-fcn :unflush-args-from-stack

* ll-fcn :unset-clink-from-c

* ll-fcn :unset-clink-from-c-leaf

* ll-fcn :remove-clink

* ll-fcn :set-clink-final

* ll-fcn :set-glob-function

* ll-fcn :synch-data-cache

* ll-fcn :synch-instr-cache