diff options
author | xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e> | 2011-06-13 18:11:19 +0000 |
---|---|---|
committer | xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e> | 2011-06-13 18:11:19 +0000 |
commit | a5ffc59246b09a389e5f8cbc2f217e323e76990f (patch) | |
tree | e1bc7cc54518aad7c20645f187cee8110de8cff9 /backend/Stacking.v | |
parent | 4daccd62b92b23016d3f343d5691f9c164a8a951 (diff) | |
download | compcert-kvx-a5ffc59246b09a389e5f8cbc2f217e323e76990f.tar.gz compcert-kvx-a5ffc59246b09a389e5f8cbc2f217e323e76990f.zip |
Revised handling of annotation statements, and more generally built-in functions, and more generally external functions
git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@1672 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
Diffstat (limited to 'backend/Stacking.v')
-rw-r--r-- | backend/Stacking.v | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/backend/Stacking.v b/backend/Stacking.v index 09d98d6c..23a112ce 100644 --- a/backend/Stacking.v +++ b/backend/Stacking.v @@ -130,6 +130,16 @@ Definition transl_op (fe: frame_env) (op: operation) := Definition transl_addr (fe: frame_env) (addr: addressing) := shift_stack_addressing (Int.repr fe.(fe_stack_data)) addr. +(** Translation of an annotation argument. *) + +Definition transl_annot_param (fe: frame_env) (l: loc) : annot_param := + match l with + | R r => APreg r + | S (Local ofs ty) => APstack (chunk_of_type ty) (offset_of_index fe (FI_local ofs ty)) + | S _ => APstack Mint32 (-1) (**r never happens *) + end. + + (** Translation of a Linear instruction. Prepends the corresponding Mach instructions to the given list of instructions. [Lgetstack] and [Lsetstack] moves between registers and stack slots @@ -173,6 +183,8 @@ Definition transl_instr (Mtailcall sig ros :: k) | Lbuiltin ef args dst => Mbuiltin ef args dst :: k + | Lannot ef args => + Mannot ef (map (transl_annot_param fe) args) :: k | Llabel lbl => Mlabel lbl :: k | Lgoto lbl => |