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/RTLtyping.v | 2 ++ 1 file changed, 2 insertions(+) (limited to 'backend/RTLtyping.v') diff --git a/backend/RTLtyping.v b/backend/RTLtyping.v index 9992ab79..fef74706 100644 --- a/backend/RTLtyping.v +++ b/backend/RTLtyping.v @@ -77,6 +77,7 @@ Definition type_of_builtin_arg (a: builtin_arg reg) : typ := | BA_loadglobal chunk id ofs => type_of_chunk chunk | BA_addrglobal id ofs => Tptr | BA_splitlong hi lo => Tlong + | BA_addptr a1 a2 => Tptr end. Definition type_of_builtin_res (r: builtin_res reg) : typ := @@ -249,6 +250,7 @@ Definition type_builtin_arg (e: S.typenv) (a: builtin_arg reg) (ty: typ) : res S | BA_loadglobal chunk id ofs => type_expect e ty (type_of_chunk chunk) | BA_addrglobal id ofs => type_expect e ty Tptr | BA_splitlong hi lo => type_expect e ty Tlong + | BA_addptr a1 a2 => type_expect e ty Tptr end. Fixpoint type_builtin_args (e: S.typenv) (al: list (builtin_arg reg)) (tyl: list typ) : res S.typenv := -- cgit