Previous Section Next Chapter Table of Contents Glossary Index

Chapter 18. Modifying Clozure CL

18.5. Development-Mode Dictionary

[Variable]

*WARN-IF-REDEFINE-KERNEL*

Description:

When true, attempts to redefine (via DEFUN or DEFMETHOD) functions and methods that are marked as being "predefined" signal continuable errors.

Note that these are CERRORs, not warnings, and that no lisp functions or methods have been defined in the kernel in MCL or Clozure CL since 1987 or so.

[Function]

set-development-environment &optional unmark-builtin-functions

Description:

Arranges that the outermost special bindings of *PACKAGE* and *WARN-IF-REDEFINE-KERNEL* restore values of the "CCL" package and NIL to these variables, respectively. If the optional argument is true, marks all globally defined functions and methods as being "not predefined" (this is a fairly expensive operation.)

[Function]

set-user-environment &optional mark-builtin-functions

Description:

Arranges that the outermost special bindings of *PACKAGE* and *WARN-IF-REDEFINE-KERNEL* restore values of the "CL-USER" package and T to these variables, respectively. If the optional argument is true, marks all globally defined functions and methods as being "predefined" (this is a fairly expensive operation.)

[Variable]

*ALTIVEC-AVAILABLE*

Description:

This variable is initialized each time an Clozure CL session starts based on information provided by the lisp kernel. Its value is true if AltiVec is present and false otherwise. This variable shouldn't be set by user code.

[Function]

altivec-available-p

Description:

Returns non-NIL if AltiVec is available.

[Variable]

*ALTIVEC-LAPMACROS-MAINTAIN-VRSAVE-P*

Description:

Intended to control the expansion of certain lap macros. Initialized to NIL on LinuxPPC; initialized to T on platforms (such as MacOS X/Darwin) that require that the VRSAVE SPR contain a bitmask of active vector registers at all times.

[LAP Macro]

with-altivec-registers reglist &body body

Arguments and Values:

reglist---A list of vector register names (vr0 .. vr31).

body---A sequence of PPC LAP instructions.

Description:

Specifies the set of AltiVec registers used in body. If *altivec-lapmacros-maintain-vrsave-p* is true when the macro is expanded, generates code to save the VRSAVE SPR and updates VRSAVE to include a bitmask generated from the specified register list. Generates code which saves any non-volatile vector registers which appear in the register list, executes body, and restores the saved non-volatile vector registers (and, if *altivec-lapmacros-maintain-vrsave-p* is true, restores VRSAVE as well. Uses the IMM0 register (r3) as a temporary.

[LAP Macro]

with-vector-buffer base n &body body

Arguments and Values:

base---Any available general-purpose register.

n---An integer between 1 and 254, inclusive. (Should typically be much, much closer to 1.) Specifies the size of the buffer, in 16-byte units.

body---A sequence of PPC LAP instructions.

Description:

Generates code which allocates a 16-byte aligned buffer large enough to contain N vector registers; the GPR base points to the lowest address of this buffer. After processing body, the buffer will be deallocated. The body should preserve the value of base as long as it needs to reference the buffer. It's intended that base be used as a base register in stvx and lvx instructions within the body.


Previous Section Next Chapter Table of Contents Glossary Index