From 4445d6771d68d17e14e491475c74492b7d2e1205 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20=C3=81vila=20de=20Esp=C3=ADndola?= Date: Thu, 5 May 2011 18:49:45 -0400 Subject: Use symbolic register names so that we get the correct encoding on OS X. --- src/comp/back/x86.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/comp/back/x86.rs b/src/comp/back/x86.rs index a40592d5..f439d23e 100644 --- a/src/comp/back/x86.rs +++ b/src/comp/back/x86.rs @@ -31,7 +31,7 @@ fn save_callee_saves_with_cfi() -> vec[str] { auto t; t = vec("pushl %ebp"); t += vec(".cfi_def_cfa_offset " + istr(offset)); - t += vec(".cfi_offset 5, -" + istr(offset)); + t += vec(".cfi_offset %ebp, -" + istr(offset)); t += vec("pushl %edi"); offset += 4; @@ -251,7 +251,7 @@ fn native_glue(int n_args, abi.native_glue_type ngt) -> vec[str] { + save_callee_saves_with_cfi() + vec("movl %esp, %ebp # ebp = rust_sp") - + vec(".cfi_def_cfa_register 5") + + vec(".cfi_def_cfa_register %ebp") + store_esp_to_rust_sp_second_arg() + load_esp_from_runtime_sp_second_arg() -- cgit v1.2.3