This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[JAVA] Implement more java.lang.Math builtins.
- From: Andrew Haley <aph at redhat dot com>
- To: Roger Sayle <roger at eyesopen dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 29 May 2003 17:14:14 +0100
- Subject: [JAVA] Implement more java.lang.Math builtins.
- References: <Pine.LNX.4.44.0305282049570.1162-100000@www.eyesopen.com>
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.