diff --git a/compiler/vmdef.lisp b/compiler/vmdef.lisp index 278cf0582c86f773c5f950ce92fce161941d8885..ed6b1d40c1a0559a0e9e93ab8abf19df56ed5282 100644 --- a/compiler/vmdef.lisp +++ b/compiler/vmdef.lisp @@ -131,8 +131,8 @@ ;;; ;;; (defmacro define-storage-class (name number sb-name &key (element-size '1) - (alignment '1) locations save-p - alternate-scs constant-scs) + (alignment '1) locations reserve-locations + save-p alternate-scs constant-scs) "Define-Storage-Class Name Number Storage-Base {Key Value}* Define a storage class Name that uses the named Storage-Base. Number is a small, non-negative integer that is used as an alias. The following @@ -150,6 +150,10 @@ If the SB is :Finite, then this is a list of the offsets within the SB that are in this SC. + :Reserve-Locations (Location*) + A subset of the Locations that the register allocator should try to + reserve for operand loading (instead of to hold variable values.) + :Save-P {T | NIL} If T, then values stored in this SC must be saved in one of the non-save-p :Alternate-SCs across calls. @@ -169,6 +173,7 @@ (check-type number sc-number) (check-type sb-name symbol) (check-type locations list) + (check-type reserve-locations list) (check-type save-p boolean) (check-type alternate-scs list) (check-type constant-scs list) @@ -185,6 +190,9 @@ (when locations (error ":Locations is meaningless in a ~S SB." (sb-kind sb)))) + (unless (subsetp reserve-locations locations) + (error "Reserve-Locations not a subset of Locations.")) + (when (and (or alternate-scs constant-scs) (eq (sb-kind sb) :non-packed)) (error "Meaningless to specify alternate or constant SCs in a ~S SB." @@ -204,6 +212,7 @@ :element-size ,element-size :alignment ,alignment :locations ',locations + :reserve-locations ',reserve-locations :save-p ',save-p :number-stack-p ,nstack-p :alternate-scs (mapcar #'meta-sc-or-lose