From e8f2ef5c8c926462277afb520cacaa265b7e612c Mon Sep 17 00:00:00 2001 From: Bernhard Schommer Date: Fri, 25 Nov 2016 11:06:15 +0100 Subject: Do not use hardcoded register number for sp. Since the dwarf register names for x86_32 and x86_64 differ it is wrong to hardcode the dwarf register number for rsp to 4. Bug 20461 --- x86/Asmexpand.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'x86') diff --git a/x86/Asmexpand.ml b/x86/Asmexpand.ml index 0436bc86..90dc0e69 100644 --- a/x86/Asmexpand.ml +++ b/x86/Asmexpand.ml @@ -618,7 +618,7 @@ let expand_function id fn = try set_current_function fn; if !Clflags.option_g then - expand_debug id 4 preg_to_dwarf expand_instruction fn.fn_code + expand_debug id (int_reg_to_dwarf RSP) preg_to_dwarf expand_instruction fn.fn_code else List.iter expand_instruction fn.fn_code; Errors.OK (get_current_function ()) -- cgit