diff options
author | François Pottier <francois.pottier@inria.fr> | 2015-10-23 15:08:33 +0200 |
---|---|---|
committer | François Pottier <francois.pottier@inria.fr> | 2015-10-23 15:17:50 +0200 |
commit | 136986c204af19341aeb455d72fe817b16fa6fff (patch) | |
tree | 02e9178d9f2cf942bd32366891d480ff161406f6 /cparser/ExtendedAsm.ml | |
parent | c46723c0169145d41d1879c236f53314456f1ba1 (diff) | |
parent | 1cb3d93ff278ebbd0c6967c5f9401a97f9b618b4 (diff) | |
download | compcert-136986c204af19341aeb455d72fe817b16fa6fff.tar.gz compcert-136986c204af19341aeb455d72fe817b16fa6fff.zip |
Merge remote branch 'upstream/master' into clean
Conflicts:
Makefile.extr
Diffstat (limited to 'cparser/ExtendedAsm.ml')
-rw-r--r-- | cparser/ExtendedAsm.ml | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/cparser/ExtendedAsm.ml b/cparser/ExtendedAsm.ml index 05084561..94fcda31 100644 --- a/cparser/ExtendedAsm.ml +++ b/cparser/ExtendedAsm.ml @@ -18,7 +18,7 @@ (* The [transf_asm] function in this module takes a full GCC-style extended asm statement and puts it in the form supported by CompCert, namely: - - 0 or 1 output of kind "r" + - 0 or 1 output of kind "r" - 0, 1 or several inputs of kind "r". Inputs and outputs of kind "m" (memory location) are emulated by taking the address of the operand and treating it as @@ -116,7 +116,7 @@ let rec transf_inputs loc env accu pos pos' subst = function transf_inputs loc env (e :: accu) (pos + 1) (pos' + 1) (set_label_reg lbl pos pos' subst) inputs end - + (* Transform the output operands: - outputs of kind "=m" become an input (equal to the address of the output) *) @@ -147,7 +147,7 @@ let transf_outputs loc env = function | outputs -> error "%aUnsupported feature: asm statement with 2 or more outputs" formatloc loc; - (* Bind the outputs so that we don't get another error + (* Bind the outputs so that we don't get another error when substituting the text *) let rec bind_outputs pos subst = function | [] -> (None, [], subst, pos, pos) @@ -165,7 +165,7 @@ let check_clobbers loc clob = || List.mem c' Machregsaux.scratch_register_names || c' = "MEMORY" || c' = "CC" then () - else error "%aError: unrecognized asm register clobber '%s'" + else error "%aError: unrecognized asm register clobber '%s'" formatloc loc c) clob @@ -174,7 +174,7 @@ let check_clobbers loc clob = let re_asm_placeholder = Str.regexp "\\(%[QR]?\\([0-9]+\\|\\[[a-zA-Z_][a-zA-Z_0-9]*\\]\\)\\|%%\\)" -let rename_placeholders loc template subst = +let rename_placeholders loc template subst = let rename p = if p = "%%" then p else try |