X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fx86%2Fvm.lisp;h=a56b5a3f03d66238b390e4bac6a44bdc1c804bf7;hb=3a2c2a2217f77e0d1a44a581c83e0311ebc2594a;hp=bb7a6221dede3aca253995227e0b75eb3422f768;hpb=22b819c0cd0ca0ea5be52ba280b9e9e0b8e86210;p=sbcl.git diff --git a/src/compiler/x86/vm.lisp b/src/compiler/x86/vm.lisp index bb7a622..a56b5a3 100644 --- a/src/compiler/x86/vm.lisp +++ b/src/compiler/x86/vm.lisp @@ -182,7 +182,7 @@ ;; the non-descriptor stacks (signed-stack stack) ; (signed-byte 32) (unsigned-stack stack) ; (unsigned-byte 32) - (base-char-stack stack) ; non-descriptor characters. + (character-stack stack) ; non-descriptor characters. (sap-stack stack) ; System area pointers. (single-stack stack) ; single-floats (double-stack stack :element-size 2) ; double-floats. @@ -228,12 +228,14 @@ :alternate-scs (control-stack)) ;; non-descriptor characters - (base-char-reg registers - :locations #.*byte-regs* + (character-reg registers + :locations #!-sb-unicode #.*byte-regs* + #!+sb-unicode #.*dword-regs* + #!-sb-unicode #!-sb-unicode :reserve-locations (#.ah-offset #.al-offset) :constant-scs (immediate) :save-p t - :alternate-scs (base-char-stack)) + :alternate-scs (character-stack)) ;; non-descriptor SAPs (arbitrary pointers into address space) (sap-reg registers @@ -322,11 +324,13 @@ (catch-block stack :element-size kludge-nondeterministic-catch-block-size)) (eval-when (:compile-toplevel :load-toplevel :execute) -(defparameter *byte-sc-names* '(base-char-reg byte-reg base-char-stack)) +(defparameter *byte-sc-names* + '(#!-sb-unicode character-reg byte-reg #!-sb-unicode character-stack)) (defparameter *word-sc-names* '(word-reg)) (defparameter *dword-sc-names* '(any-reg descriptor-reg sap-reg signed-reg unsigned-reg control-stack - signed-stack unsigned-stack sap-stack single-stack constant)) + signed-stack unsigned-stack sap-stack single-stack + #!+sb-unicode character-reg #!+sb-unicode character-stack constant)) ;;; added by jrd. I guess the right thing to do is to treat floats ;;; as a separate size... ;;; @@ -375,20 +379,9 @@ ;;; If value can be represented as an immediate constant, then return ;;; the appropriate SC number, otherwise return NIL. (!def-vm-support-routine immediate-constant-sc (value) - ;; KLUDGE: although this might not look different from the FIXNUM - ;; below, in the TYPECASE, SB-INT:FIXNUMP actually tests against the - ;; target FIXNUM type, as opposed to TYPECASE FIXNUM which tests - ;; against the host FIXNUM range. - #+sb-xc-host - (when (fixnump value) - ;; FIXME: this block name was not obvious. Also, since this idiom - ;; is presumably going to be repeated in all six (current) - ;; backends, it would be nice to wrap it up somewhat more nicely. - ;; -- CSR, 2003-04-20 - (return-from impl-of-vm-support-routine-immediate-constant-sc - (sc-number-or-lose 'immediate))) (typecase value - ((or fixnum #-sb-xc-host system-area-pointer character) + ((or (integer #.sb!xc:most-negative-fixnum #.sb!xc:most-positive-fixnum) + #-sb-xc-host system-area-pointer character) (sc-number-or-lose 'immediate)) (symbol (when (static-symbol-p value) @@ -456,13 +449,3 @@ (immediate-constant "Immed") (noise (symbol-name (sc-name sc)))))) ;;; FIXME: Could this, and everything that uses it, be made #!+SB-SHOW? - - -;;; The loader uses this to convert alien names to the form they need in -;;; the symbol table (for example, prepending an underscore). -(defun extern-alien-name (name) - (declare (type simple-string name)) - ;; OpenBSD is non-ELF, and needs a _ prefix - #!+openbsd (concatenate 'string "_" name) - ;; The other (ELF) ports currently don't need any prefix - #!-openbsd name)