From 9baff1c0652a4234dd1e41a5d63eb3ff707dfc66 Mon Sep 17 00:00:00 2001 From: Xavier Leroy Date: Tue, 8 Nov 2016 15:03:55 +0100 Subject: x86: mark register rax as destroyed by calls Calls to variadic or unprototyped functions set this register to reflect the number of arguments passed in XMM registers. Thus we must make sure that rax is not used to hold the pointer to the function being called. (Report by Michael Schmidt.) --- x86/Machregs.v | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'x86/Machregs.v') diff --git a/x86/Machregs.v b/x86/Machregs.v index 741081a6..04be0cd6 100644 --- a/x86/Machregs.v +++ b/x86/Machregs.v @@ -196,7 +196,7 @@ Definition destroyed_by_setstack (ty: typ): list mreg := end. Definition destroyed_at_indirect_call: list mreg := - nil. + AX :: nil. Definition temp_for_parent_frame: mreg := AX. -- cgit