+2000-09-24 Joseph S. Myers <jsm28@cam.ac.uk>
+
+ * builtins.def (BUILT_IN_LLABS): Add.
+ * builtins.c (expand_builtin): Also abort on BUILT_IN_LLABS.
+ * c-common.c (c_common_nodes_builtins): Create builtin functions
+ __builtin_llabs, and plain llabs unless no_nonansi_builtins
+ outside of C99 mode.
+ (expand_tree_builtin): Handle BUILT_IN_LLABS.
+
Sat 23-Sep-2000 22:39:18 BST Neil Booth <NeilB@earthling.net>
* cpphash.h (CPP_RESERVE, CPP_PUTS_Q, CPP_PUTS, CPP_PUTC_Q,
tree int_ftype_cptr_cptr_sizet;
tree int_ftype_string_string, string_ftype_ptr_ptr;
tree long_ftype_long;
+ tree longlong_ftype_longlong;
/* Either char* or void*. */
tree traditional_ptr_type_node;
/* Either const char* or const void*. */
tree_cons (NULL_TREE, long_integer_type_node,
endlink));
+ longlong_ftype_longlong
+ = build_function_type (long_long_integer_type_node,
+ tree_cons (NULL_TREE, long_long_integer_type_node,
+ endlink));
+
int_ftype_cptr_cptr_sizet
= build_function_type (integer_type_node,
tree_cons (NULL_TREE, const_ptr_type_node,
BUILT_IN_NORMAL, NULL_PTR);
builtin_function ("__builtin_labs", long_ftype_long, BUILT_IN_LABS,
BUILT_IN_NORMAL, NULL_PTR);
+ builtin_function ("__builtin_llabs", longlong_ftype_longlong, BUILT_IN_LLABS,
+ BUILT_IN_NORMAL, NULL_PTR);
builtin_function ("__builtin_saveregs", ptr_ftype, BUILT_IN_SAVEREGS,
BUILT_IN_NORMAL, NULL_PTR);
builtin_function ("__builtin_classify_type", default_function_type,
BUILT_IN_NORMAL, NULL_PTR);
builtin_function ("labs", long_ftype_long, BUILT_IN_LABS,
BUILT_IN_NORMAL, NULL_PTR);
+ if (flag_isoc99 || ! no_nonansi_builtins)
+ builtin_function ("llabs", longlong_ftype_longlong, BUILT_IN_LLABS,
+ BUILT_IN_NORMAL, NULL_PTR);
builtin_function ("memcpy", memcpy_ftype, BUILT_IN_MEMCPY,
BUILT_IN_NORMAL, NULL_PTR);
builtin_function ("memcmp", int_ftype_cptr_cptr_sizet, BUILT_IN_MEMCMP,
{
case BUILT_IN_ABS:
case BUILT_IN_LABS:
+ case BUILT_IN_LLABS:
case BUILT_IN_FABS:
if (coerced_params == 0)
return integer_zero_node;