From dff22ef6d855973e0e0f05c7203a6bfa9a4cf01a Mon Sep 17 00:00:00 2001 From: Xavier Leroy Date: Thu, 15 Jun 2017 15:11:26 +0200 Subject: Extend builtin arguments with a pointer addition operator This extension enables more addressing modes to be encoded as builtin arguments and used in conjunction with volatile memory accesses. Current status: x86 port only, the only new addressing mode handled is reg + offset. --- backend/RTLgen.v | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'backend/RTLgen.v') diff --git a/backend/RTLgen.v b/backend/RTLgen.v index cfbf57d6..6d81f84b 100644 --- a/backend/RTLgen.v +++ b/backend/RTLgen.v @@ -396,6 +396,10 @@ Fixpoint convert_builtin_arg {A: Type} (a: builtin_arg expr) (rl: list A) : buil let (hi', rl1) := convert_builtin_arg hi rl in let (lo', rl2) := convert_builtin_arg lo rl1 in (BA_splitlong hi' lo', rl2) + | BA_addptr a1 a2 => + let (a1', rl1) := convert_builtin_arg a1 rl in + let (a2', rl2) := convert_builtin_arg a2 rl1 in + (BA_addptr a1' a2', rl2) end. Fixpoint convert_builtin_args {A: Type} (al: list (builtin_arg expr)) (rl: list A) : list (builtin_arg A) := -- cgit