X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fcodegen.lisp;h=b0107e189904b28852241eb0b94a1de53103b3d2;hb=7f1e94ae961a198e00daf281eb1dc858e5b2dcc7;hp=0756176b1b589030219757dddbcc6c865fa4a17a;hpb=2230ea0c1765a95fd2aa0a8996b3555b93ba3745;p=sbcl.git diff --git a/src/compiler/codegen.lisp b/src/compiler/codegen.lisp index 0756176..b0107e1 100644 --- a/src/compiler/codegen.lisp +++ b/src/compiler/codegen.lisp @@ -151,16 +151,19 @@ ;; Align first emitted block of each loop: x86 and x86-64 both ;; like 16 byte alignment, however, since x86 aligns code objects ;; on 8 byte boundaries we cannot guarantee proper loop alignment - ;; there (yet.) - #!+x86-64 - (let ((cloop (sb!c::block-loop 1block))) - (when (and cloop - (sb!c::loop-tail cloop) - (not (sb!c::loop-info cloop))) - (sb!assem:emit-alignment sb!vm:n-lowtag-bits #x90) - ;; Mark the loop as aligned by saving the IR1 block aligned. - (setf (sb!c::loop-info cloop) 1block))) - (sb!assem:emit-label (block-label 1block))) + ;; there (yet.) Only x86-64 does something with ALIGNP, but + ;; it may be useful in the future. + (let ((alignp (let ((cloop (block-loop 1block))) + (when (and cloop + (loop-tail cloop) + (not (loop-info cloop))) + ;; Mark the loop as aligned by saving the IR1 block aligned. + (setf (loop-info cloop) 1block) + t)))) + (emit-block-header (block-label 1block) + (ir2-block-%trampoline-label block) + (ir2-block-dropped-thru-to block) + alignp))) (let ((env (block-physenv 1block))) (unless (eq env prev-env) (let ((lab (gen-label))) @@ -184,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))