This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[JAVA] Implement more java.lang.Math builtins.


Roger Sayle writes:
 > 
 > 2003-05-28  Roger Sayle  <roger@eyesopen.com>
 > 
 > 	* builtins.c (cos_builtin, sin_builtin, sqrt_builtin): Delete.
 > 	(builtin_record): Add an additional builtin_code field to
 > 	record which GCC built-in the corresponds to Java function.
 > 	(java_builtins):  Add new entries for atan, atan2, exp, log,
 > 	pow and tan.
 > 	(max_builtin, min_builtin, abs_builtin): Perform constant
 > 	folding on the resulting tree.
 > 	(java_build_function_call_expr): Likewise, perform constant
 > 	folding on the resulting tree.
 > 	(initialize_builtins): The NULL creators are now allowed in
 > 	the java_builtins table, which is now terminated by an entry
 > 	with builtin_code == END_BUILTINS.
 > 	(check_for_builtin): Likewise.  If the matching creator is
 > 	NULL, construct the call using java_build_function_call_expr
 > 	directly with the decl for the corresponding builtin_code.

This is OK for the time being, on the understanding that you'll
provide a workaround for platforms whose libc functions aren't known
to be sufficiently accurate.

Andrew.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]