From 99c200fda59e7dfe5d9183ab3566c42c81f3ebc9 Mon Sep 17 00:00:00 2001 From: Ben Vanik Date: Thu, 2 Jan 2014 23:39:53 -0800 Subject: [PATCH] Fixing warning. --- src/alloy/backend/x64/x64_code_cache.cc | 2 +- src/alloy/backend/x64/x64_emitter.cc | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/alloy/backend/x64/x64_code_cache.cc b/src/alloy/backend/x64/x64_code_cache.cc index f0f4aa1eb..aa14ad0ea 100644 --- a/src/alloy/backend/x64/x64_code_cache.cc +++ b/src/alloy/backend/x64/x64_code_cache.cc @@ -232,7 +232,7 @@ void X64CodeChunk::AddTableEntry(uint8_t* code, size_t code_size) { auto& fn_entry = fn_table[fn_table_count++]; fn_entry.BeginAddress = (DWORD)(code - buffer); fn_entry.EndAddress = (DWORD)(fn_entry.BeginAddress + code_size); - fn_entry.UnwindData = unwind_info_offset; + fn_entry.UnwindData = (DWORD)unwind_info_offset; // Notify the function table that it has new entries. RtlGrowFunctionTable(fn_table_handle, fn_table_count); diff --git a/src/alloy/backend/x64/x64_emitter.cc b/src/alloy/backend/x64/x64_emitter.cc index 66a11274d..2eed311e3 100644 --- a/src/alloy/backend/x64/x64_emitter.cc +++ b/src/alloy/backend/x64/x64_emitter.cc @@ -109,6 +109,9 @@ int XbyakGenerator::Emit(LIRBuilder* builder) { // RBX, RBP, RDI, RSI, RSP, R12, R13, R14, R15 // Only want to do this if we actually use them, though, otherwise // it just adds overhead. + // IMPORTANT: any changes to the prolog must be kept in sync with + // X64CodeCache, which dynamically generates exception information. + // Adding or changing anything here must be matched! const size_t stack_size = 16; sub(rsp, stack_size);