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. --- x86/Asmexpand.ml | 2 ++ 1 file changed, 2 insertions(+) (limited to 'x86/Asmexpand.ml') diff --git a/x86/Asmexpand.ml b/x86/Asmexpand.ml index 8e69061e..1b716165 100644 --- a/x86/Asmexpand.ml +++ b/x86/Asmexpand.ml @@ -108,6 +108,8 @@ let addressing_of_builtin_arg = function | BA (IR r) -> linear_addr r Z.zero | BA_addrstack ofs -> linear_addr RSP (Integers.Ptrofs.unsigned ofs) | BA_addrglobal(id, ofs) -> global_addr id ofs + | BA_addptr(BA (IR r), BA_int n) -> linear_addr r (Integers.Int.signed n) + | BA_addptr(BA (IR r), BA_long n) -> linear_addr r (Integers.Int64.signed n) | _ -> assert false (* Handling of memcpy *) -- cgit