From 7912a79fa5832922f9bdbaf81bc0cde77df6aed1 Mon Sep 17 00:00:00 2001 From: MerryMage Date: Sat, 27 Aug 2016 11:04:43 +0100 Subject: [PATCH] emit_x64: align before emitting blocks --- src/backend_x64/emit_x64.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/backend_x64/emit_x64.cpp b/src/backend_x64/emit_x64.cpp index cf1320aa..5bfa5fa3 100644 --- a/src/backend_x64/emit_x64.cpp +++ b/src/backend_x64/emit_x64.cpp @@ -50,7 +50,7 @@ EmitX64::BlockDescriptor EmitX64::Emit(IR::Block& block) { reg_alloc.Reset(); - code->int3(); + code->align(); const CodePtr code_ptr = code->getCurr(); basic_blocks[descriptor].code_ptr = code_ptr; unique_hash_to_code_ptr[descriptor.UniqueHash()] = code_ptr; @@ -80,6 +80,7 @@ EmitX64::BlockDescriptor EmitX64::Emit(IR::Block& block) { EmitAddCycles(block.CycleCount()); EmitTerminal(block.GetTerminal(), block.Location()); + code->int3(); reg_alloc.AssertNoMoreUses();