diff options
author | David Monniaux <david.monniaux@univ-grenoble-alpes.fr> | 2020-11-18 21:07:29 +0100 |
---|---|---|
committer | David Monniaux <david.monniaux@univ-grenoble-alpes.fr> | 2020-11-18 21:07:29 +0100 |
commit | 8384d27c122ec4ca4b7ad0f524df52b61a49c66a (patch) | |
tree | d86ff8780c4435d3b4fe92b5251e0f9b447b86c7 /cfrontend/C2C.ml | |
parent | 362bdda28ca3c4dcc992575cbbe9400b64425990 (diff) | |
parent | e6e036b3f285d2f3ba2a5036a413eb9c7d7534cd (diff) | |
download | compcert-kvx-8384d27c122ec4ca4b7ad0f524df52b61a49c66a.tar.gz compcert-kvx-8384d27c122ec4ca4b7ad0f524df52b61a49c66a.zip |
Merge branch 'master' (Absint 3.8) into kvx-work-merge3.8
Diffstat (limited to 'cfrontend/C2C.ml')
-rw-r--r-- | cfrontend/C2C.ml | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/cfrontend/C2C.ml b/cfrontend/C2C.ml index 75f5eb3e..d830ada6 100644 --- a/cfrontend/C2C.ml +++ b/cfrontend/C2C.ml @@ -194,12 +194,28 @@ let builtins_generic = { (TInt(IUInt, []), [TInt(IUInt, [])], false); "__builtin_bswap16", (TInt(IUShort, []), [TInt(IUShort, [])], false); + "__builtin_clz", + (TInt(IInt, []), [TInt(IUInt, [])], false); + "__builtin_clzl", + (TInt(IInt, []), [TInt(IULong, [])], false); + "__builtin_clzll", + (TInt(IInt, []), [TInt(IULongLong, [])], false); + "__builtin_ctz", + (TInt(IInt, []), [TInt(IUInt, [])], false); + "__builtin_ctzl", + (TInt(IInt, []), [TInt(IULong, [])], false); + "__builtin_ctzll", + (TInt(IInt, []), [TInt(IULongLong, [])], false); (* Floating-point absolute value *) "__builtin_fabs", (TFloat(FDouble, []), [TFloat(FDouble, [])], false); + "__builtin_fabsf", + (TFloat(FFloat, []), [TFloat(FFloat, [])], false); (* Float arithmetic *) "__builtin_fsqrt", (TFloat(FDouble, []), [TFloat(FDouble, [])], false); + "__builtin_sqrt", + (TFloat(FDouble, []), [TFloat(FDouble, [])], false); (* Block copy *) "__builtin_memcpy_aligned", (TVoid [], @@ -1540,7 +1556,7 @@ let convertProgram p = let p' = { prog_defs = gl2; prog_public = public_globals gl2; - prog_main = intern_string "main"; + prog_main = intern_string !Clflags.main_function_name; prog_types = typs; prog_comp_env = ce } in Diagnostics.check_errors (); |