aboutsummaryrefslogtreecommitdiffstats
path: root/common/AST.v
diff options
context:
space:
mode:
authorXavier Leroy <xavier.leroy@inria.fr>2015-04-21 10:21:06 +0200
committerXavier Leroy <xavier.leroy@inria.fr>2015-04-21 10:21:06 +0200
commit426881cde464691b61c5c49cf5038d21aace75fe (patch)
tree0817d5fe4d5d51abd793e471f73f0ad9de3f2228 /common/AST.v
parent1b5db339bb05f773a6a132be4c0b8cea54d50461 (diff)
downloadcompcert-kvx-426881cde464691b61c5c49cf5038d21aace75fe.tar.gz
compcert-kvx-426881cde464691b61c5c49cf5038d21aace75fe.zip
Support for GCC-style extended asm, continued:
- support "r", "m" and "i" constraints - support "%Q" and "%R" modifiers for register pairs - support register clobbers - split off analysis and transformation of asm statements in cparser/ExtendedAsm.ml
Diffstat (limited to 'common/AST.v')
-rw-r--r--common/AST.v7
1 files changed, 4 insertions, 3 deletions
diff --git a/common/AST.v b/common/AST.v
index 1e1e2b9d..2550844b 100644
--- a/common/AST.v
+++ b/common/AST.v
@@ -584,7 +584,7 @@ Inductive external_function : Type :=
(** Another form of annotation that takes one argument, produces
an event carrying the text and the value of this argument,
and returns the value of the argument. *)
- | EF_inline_asm (text: ident) (sg: signature).
+ | EF_inline_asm (text: ident) (sg: signature) (clobbers: list ident).
(** Inline [asm] statements. Semantically, treated like an
annotation with no parameters ([EF_annot text nil]). To be
used with caution, as it can invalidate the semantic
@@ -606,7 +606,7 @@ Definition ef_sig (ef: external_function): signature :=
| EF_memcpy sz al => mksignature (Tint :: Tint :: nil) None cc_default
| EF_annot text targs => mksignature targs None cc_default
| EF_annot_val text targ => mksignature (targ :: nil) (Some targ) cc_default
- | EF_inline_asm text sg => sg
+ | EF_inline_asm text sg clob => sg
end.
(** Whether an external function should be inlined by the compiler. *)
@@ -624,7 +624,7 @@ Definition ef_inline (ef: external_function) : bool :=
| EF_memcpy sz al => true
| EF_annot text targs => true
| EF_annot_val text targ => true
- | EF_inline_asm text targs => true
+ | EF_inline_asm text sg clob => true
end.
(** Whether an external function must reload its arguments. *)
@@ -642,6 +642,7 @@ Proof.
generalize ident_eq signature_eq chunk_eq typ_eq zeq Int.eq_dec; intros.
decide equality.
apply list_eq_dec. auto.
+ apply list_eq_dec. auto.
Defined.
Global Opaque external_function_eq.