From 673e63b95a69cf596526c675793465f4faf2c189 Mon Sep 17 00:00:00 2001 From: Nikodemus Siivola Date: Fri, 19 Sep 2008 20:06:53 +0000 Subject: [PATCH] 1.0.20.13: don't align elsewhere segments on x86 and x86-86 * There doesn't seem to be any need to do it, and the alignment NOP's are a waste of space. * Even though currently only elsewhere segments appear as the second argument to APPEND-SEGMENT, make sure we omit alignment only from elsewhere segments by changing SEGMENT-NAME to SEGMENT-TYPE (either :REGULAR or :ELSEWHERE) and checking it in APPEND-SEGMENT. --- src/compiler/assem.lisp | 14 +++++++++----- src/compiler/codegen.lisp | 4 ++-- version.lisp-expr | 2 +- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/compiler/assem.lisp b/src/compiler/assem.lisp index 24dfee1..867cf4f 100644 --- a/src/compiler/assem.lisp +++ b/src/compiler/assem.lisp @@ -26,8 +26,8 @@ ;;; This structure holds the state of the assembler. (defstruct (segment (:copier nil)) - ;; the name of this segment (for debugging output and stuff) - (name "unnamed" :type simple-string) + ;; the type of this segment (for debugging output and stuff) + (type :regular :type (member :regular :elsewhere)) ;; Ordinarily this is a vector where instructions are written. If ;; the segment is made invalid (e.g. by APPEND-SEGMENT) then the ;; vector can be replaced by NIL. This used to be an adjustable @@ -1290,7 +1290,11 @@ (setf (segment-postits segment) (segment-postits other-segment)) (dolist (postit postits) (emit-back-patch segment 0 postit))) - (emit-alignment segment nil max-alignment #!+(or x86-64 x86) #x90) + #!-(or x86 x86-64) + (emit-alignment segment nil max-alignment) + #!+(or x86 x86-64) + (unless (eq :elsewhere (segment-type other-segment)) + (emit-alignment segment nil max-alignment)) (let ((segment-current-index-0 (segment-current-index segment)) (segment-current-posn-0 (segment-current-posn segment))) (incf (segment-current-index segment) @@ -1310,8 +1314,8 @@ ;; worth enough in efficiency to justify it? -- WHN 19990322 (let ((last (segment-last-annotation segment))) (if last - (setf (cdr last) other-annotations) - (setf (segment-annotations segment) other-annotations))) + (setf (cdr last) other-annotations) + (setf (segment-annotations segment) other-annotations))) (setf (segment-last-annotation segment) (segment-last-annotation other-segment))))) (values)) diff --git a/src/compiler/codegen.lisp b/src/compiler/codegen.lisp index 2eafcda..e35909d 100644 --- a/src/compiler/codegen.lisp +++ b/src/compiler/codegen.lisp @@ -102,14 +102,14 @@ (defun init-assembler () (setf *code-segment* - (sb!assem:make-segment :name "regular" + (sb!assem:make-segment :type :regular :run-scheduler (default-segment-run-scheduler) :inst-hook (default-segment-inst-hook))) #!+sb-dyncount (setf (sb!assem:segment-collect-dynamic-statistics *code-segment*) *collect-dynamic-statistics*) (setf *elsewhere* - (sb!assem:make-segment :name "elsewhere" + (sb!assem:make-segment :type :elsewhere :run-scheduler (default-segment-run-scheduler) :inst-hook (default-segment-inst-hook))) (values)) diff --git a/version.lisp-expr b/version.lisp-expr index d123f5f..9d5513a 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -17,4 +17,4 @@ ;;; checkins which aren't released. (And occasionally for internal ;;; versions, especially for internal versions off the main CVS ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".) -"1.0.20.12" +"1.0.20.13" -- 1.7.10.4