diff options
author | xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e> | 2010-03-02 16:20:07 +0000 |
---|---|---|
committer | xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e> | 2010-03-02 16:20:07 +0000 |
commit | 1e70094155a23207b191e4f20e5b05f485fbf654 (patch) | |
tree | e4d02c2cf10dc6670269a7167bb01d2224cbc7c8 /cfrontend/Cshmgen.v | |
parent | 28e4632d36d175ac9da0befa1a727a58604031e1 (diff) | |
download | compcert-1e70094155a23207b191e4f20e5b05f485fbf654.tar.gz compcert-1e70094155a23207b191e4f20e5b05f485fbf654.zip |
Function types didn't always degrade to pointers like they should. Introduced and used Csyntax.typeconv to address this issue and reduce the number of cases in the classify functions
git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@1266 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
Diffstat (limited to 'cfrontend/Cshmgen.v')
-rw-r--r-- | cfrontend/Cshmgen.v | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cfrontend/Cshmgen.v b/cfrontend/Cshmgen.v index acce971f..b40b94c7 100644 --- a/cfrontend/Cshmgen.v +++ b/cfrontend/Cshmgen.v @@ -117,7 +117,7 @@ Definition make_neg (e: expr) (ty: type) := end. Definition make_notbool (e: expr) (ty: type) := - match ty with + match typeconv ty with | Tfloat _ => Ebinop (Ocmpf Ceq) e (make_floatconst Float.zero) | _ => Eunop Onotbool e end. @@ -197,7 +197,7 @@ Definition make_cmp (c: comparison) (e1: expr) (ty1: type) (e2: expr) (ty2: type | cmp_case_I32unsi => OK (Ebinop (Ocmpu c) e1 e2) | cmp_case_ipip => OK (Ebinop (Ocmp c) e1 e2) | cmp_case_ff => OK (Ebinop (Ocmpf c) e1 e2) - | cmp_default => Error (msg "Cshmgen.make_shr") + | cmp_default => Error (msg "Cshmgen.make_cmp") end. Definition make_andbool (e1: expr) (ty1: type) (e2: expr) (ty2: type) := |