enum built_in_function and divdc3
Jack Howarth
howarth@bromo.med.uc.edu
Sun Feb 6 16:12:00 GMT 2011
Richard,
The ___divdc3 symbol on Snow Leopard in libSystem is less accurate
than that in FSF libgcc (PR42333). We plan to use DECLARE_LIBRARY_RENAMES
to provide an alternative symbol ___ieee_divdc3 to access the FSF libgcc
___divdc3 symbol when libSystem.dylib is linked first and !flag_unsafe_math_optimization.
We originally planned to use a darwin_patch_divdc3() modelled directly on
darwin_patch_builtin() in gcc/config/darwin.c, however the absence of a listing
of divdc3 in gcc/builtins.def makes the syntax...
tree fn = built_in_decls[BUILT_IN_DIVDC3];
impossible. I noticed you did the original commit for the current complex
division functions...
2005-02-11 Richard Henderson <rth@redhat.com>
* tree-complex.c (expand_complex_libcall): New.
(expand_complex_multiplication): Use it for c99 compliance.
(expand_complex_division): Likewise.
* fold-const.c (fold_complex_add, fold_complex_mult): New.
(fold): Call them.
* builtins.c (built_in_names): Remove const.
* tree.c (build_common_builtin_nodes): Build complex arithmetic
builtins.
* tree.h (BUILT_IN_COMPLEX_MUL_MIN, BUILT_IN_COMPLEX_MUL_MAX): New.
(BUILT_IN_COMPLEX_DIV_MIN, BUILT_IN_COMPLEX_DIV_MAX): New.
(built_in_names): Remove const.
* c-common.c (c_common_type_for_mode): Handle complex modes.
* flags.h, toplev.c (flag_complex_method): Rename from
flag_complex_divide_method.
* libgcc2.c (__divsc3, __divdc3, __divxc3, __divtc3,
__mulsc3, __muldc3, __mulxc3, __multc3): New.
* libgcc2.h: Declare them.
* libgcc-std.ver: Export them.
* mklibgcc.in (lib2funcs): Build them.
I also noticed...
#define DEF_BUILTIN(ENUM, N, C, T, LT, B, F, NA, AT, IM, COND) ENUM,
enum built_in_function
{
#include "builtins.def"
/* Complex division routines in libgcc. These are done via builtins
because emit_library_call_value can't handle complex values. */
BUILT_IN_COMPLEX_MUL_MIN,
BUILT_IN_COMPLEX_MUL_MAX
= BUILT_IN_COMPLEX_MUL_MIN
+ MAX_MODE_COMPLEX_FLOAT
- MIN_MODE_COMPLEX_FLOAT,
BUILT_IN_COMPLEX_DIV_MIN,
BUILT_IN_COMPLEX_DIV_MAX
= BUILT_IN_COMPLEX_DIV_MIN
+ MAX_MODE_COMPLEX_FLOAT
- MIN_MODE_COMPLEX_FLOAT,
/* Upper bound on non-language-specific builtins. */
END_BUILTINS
};
#undef DEF_BUILTIN
what is the correct value is use for the enum entry of the ___divdc3
symbol? Is it END_BUILTINS-1 or END_BUILTINS-2? Thanks in advance for
any clarifications.
Jack
More information about the Gcc
mailing list