Get alignment right for block headers on x86-64, this time
authorPaul Khuong <pvk@pvk.ca>
Fri, 24 Jun 2011 03:17:22 +0000 (23:17 -0400)
committerPaul Khuong <pvk@pvk.ca>
Fri, 24 Jun 2011 03:17:22 +0000 (23:17 -0400)
 We want to align the code in the block, not the trampoline that
 leads to the block.  In theory, we could take the trampoline into
 account when inserting alignment, but really?

src/compiler/x86-64/call.lisp

index 4071fb7..b1c5395 100644 (file)
 (defun emit-block-header (start-label trampoline-label fall-thru-p alignp)
   (when (and fall-thru-p trampoline-label)
     (inst jmp start-label))
-  (when alignp
-    (emit-alignment n-lowtag-bits #x90))
   (when trampoline-label
     (emit-label trampoline-label)
     (popw rbp-tn (frame-word-offset return-pc-save-offset)))
+  (when alignp
+    (emit-alignment n-lowtag-bits #x90))
   (emit-label start-label))
 
 ;;; Non-TR local call for a fixed number of values passed according to