From: Nathan Froyd Date: Wed, 5 Sep 2012 02:24:37 +0000 (-0400) Subject: align inline constant section with long nops X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=c8ef1a3b83ce08f35ee3e481eb334decc837d214;p=sbcl.git align inline constant section with long nops Makes the disassembly much nicer, particularly at speed > space. --- diff --git a/src/compiler/codegen.lisp b/src/compiler/codegen.lisp index 37384dc..b0107e1 100644 --- a/src/compiler/codegen.lisp +++ b/src/compiler/codegen.lisp @@ -187,6 +187,7 @@ (let ((constants (sb!vm:sort-inline-constants *constant-vector*))) (assemble (*constant-segment*) (sb!vm:emit-constant-segment-header + *constant-segment* constants (do-ir2-blocks (2block component nil) (when (policy (block-last (ir2-block-block 2block)) diff --git a/src/compiler/x86-64/insts.lisp b/src/compiler/x86-64/insts.lisp index b447952..a23f5f6 100644 --- a/src/compiler/x86-64/insts.lisp +++ b/src/compiler/x86-64/insts.lisp @@ -3494,9 +3494,9 @@ (values label (make-ea size :disp (make-fixup nil :code-object label))))) -(defun emit-constant-segment-header (constants optimize) +(defun emit-constant-segment-header (segment constants optimize) (declare (ignore constants)) - (loop repeat (if optimize 64 16) do (inst byte #x90))) + (emit-long-nop segment (if optimize 64 16))) (defun size-nbyte (size) (ecase size diff --git a/src/compiler/x86/insts.lisp b/src/compiler/x86/insts.lisp index c779a8b..cc6b53e 100644 --- a/src/compiler/x86/insts.lisp +++ b/src/compiler/x86/insts.lisp @@ -2883,7 +2883,7 @@ (values label (make-ea size :disp (make-fixup nil :code-object label))))) -(defun emit-constant-segment-header (constants optimize) +(defun emit-constant-segment-header (segment constants optimize) (declare (ignore constants)) (loop repeat (if optimize 64 16) do (inst byte #x90)))