diff options
author | Jacques-Henri Jourdan <jacques-henri.jourdan@inria.fr> | 2015-11-04 03:04:21 +0100 |
---|---|---|
committer | Jacques-Henri Jourdan <jacques-henri.jourdan@inria.fr> | 2015-11-04 03:04:21 +0100 |
commit | 5664fddcab15ef4482d583673c75e07bd1e96d0a (patch) | |
tree | 878b22860e69405ba5cf6fd2798731dac8ce660c /cparser/ExtendedAsm.ml | |
parent | b960c83725d7e185ac5c6e3c0d6043c7dcd2f556 (diff) | |
parent | fe73ed58ef80da7c53c124302a608948fb190229 (diff) | |
download | compcert-5664fddcab15ef4482d583673c75e07bd1e96d0a.tar.gz compcert-5664fddcab15ef4482d583673c75e07bd1e96d0a.zip |
Merge remote-tracking branch 'origin/master' into parser_fix
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 |