From patchwork Mon Jul 12 04:55:57 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joern Rennecke X-Patchwork-Id: 58569 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 04D40B6EF2 for ; Mon, 12 Jul 2010 14:56:26 +1000 (EST) Received: (qmail 3118 invoked by alias); 12 Jul 2010 04:56:22 -0000 Received: (qmail 3105 invoked by uid 22791); 12 Jul 2010 04:56:21 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, TW_JF X-Spam-Check-By: sourceware.org Received: from c60.cesmail.net (HELO c60.cesmail.net) (216.154.195.49) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 12 Jul 2010 04:56:14 +0000 Received: from unknown (HELO delta2) ([192.168.1.50]) by c60.cesmail.net with ESMTP; 12 Jul 2010 00:55:57 -0400 Received: from 89.242.148.32 ([89.242.148.32]) by webmail.spamcop.net (Horde MIME library) with HTTP; Mon, 12 Jul 2010 00:55:57 -0400 Message-ID: <20100712005557.eh2b62mq88go8wo0-nzlynne@webmail.spamcop.net> Date: Mon, 12 Jul 2010 00:55:57 -0400 From: Joern Rennecke To: gcc-patches@gcc.gnu.org Subject: [PING]: RFA: Fix bootstrap/44335 MIME-Version: 1.0 User-Agent: Internet Messaging Program (IMP) H3 (4.1.4) Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org ----- Forwarded message from amylaar@spamcop.net ----- Date: Thu, 01 Jul 2010 16:34:21 -0400 From: Joern Rennecke Reply-To: Joern Rennecke Subject: RFA: Fix bootstrap/44335 To: gcc-patches@gcc.gnu.org Tested building all-gcc configured with --enable-werror-always on i686-pc-linux-gnu X arm-eabi with gcc (GCC) 4.6.0 20100630 (experimental). Currently boostrapping / regtesting on i686-pc-linux-gnu. ----- End forwarded message ----- As expected, there bootstrapping went fine and there were no new regressions. 2010-07-01 Joern Rennecke PR bootstrap/44335 gcc: * targhooks.c (targhook_words_big_endian): New function. (targhook_float_words_big_endian): Likewise. * targhooks.h (targhook_words_big_endian): Declare. (targhook_float_words_big_endian): Likewise. * target.def (words_big_endian, float_words_big_endian): New hooks. gcc/java: * jfc-parse.c (target.h): Include. (handle_const): Use targetm.words_big_endian and targetm.float_words_big_endian. (get_constant): Use targetm.float_words_big_endian. Index: targhooks.c =================================================================== --- targhooks.c (revision 161664) +++ targhooks.c (working copy) @@ -418,6 +418,19 @@ default_scalar_mode_supported_p (enum ma } } +/* Make some target macros useable by target-independent code. */ +bool +targhook_words_big_endian (void) +{ + return !!WORDS_BIG_ENDIAN; +} + +bool +targhook_float_words_big_endian (void) +{ + return !!FLOAT_WORDS_BIG_ENDIAN; +} + /* True if the target supports decimal floating point. */ bool Index: targhooks.h =================================================================== --- targhooks.h (revision 161664) +++ targhooks.h (working copy) @@ -68,6 +68,8 @@ extern void default_print_operand_addres extern bool default_print_operand_punct_valid_p (unsigned char); extern bool default_scalar_mode_supported_p (enum machine_mode); +extern bool targhook_words_big_endian (void); +extern bool targhook_float_words_big_endian (void); extern bool default_decimal_float_supported_p (void); extern bool default_fixed_point_supported_p (void); Index: java/jcf-parse.c =================================================================== --- java/jcf-parse.c (revision 161664) +++ java/jcf-parse.c (working copy) @@ -42,6 +42,7 @@ The Free Software Foundation is independ #include "cgraph.h" #include "vecprim.h" #include "bitmap.h" +#include "target.h" #ifdef HAVE_LOCALE_H #include @@ -557,12 +558,12 @@ handle_constant (JCF *jcf, int index, en case CONSTANT_Long: index = handle_long_constant (jcf, cpool, CONSTANT_Long, index, - WORDS_BIG_ENDIAN); + targetm.words_big_endian ()); break; case CONSTANT_Double: index = handle_long_constant (jcf, cpool, CONSTANT_Double, index, - FLOAT_WORDS_BIG_ENDIAN); + targetm.float_words_big_endian ()); break; case CONSTANT_Float: @@ -1073,7 +1074,7 @@ get_constant (JCF *jcf, int index) hi = JPOOL_UINT (jcf, index); lo = JPOOL_UINT (jcf, index+1); - if (FLOAT_WORDS_BIG_ENDIAN) + if (targetm.float_words_big_endian ()) buf[0] = hi, buf[1] = lo; else buf[0] = lo, buf[1] = hi; Index: target.def =================================================================== --- target.def (revision 161664) +++ target.def (working copy) @@ -967,6 +967,22 @@ DEFHOOK bool, (const_tree record_type), hook_bool_const_tree_false) +/* For now this is only an interface to FLOAT_WORDS_BIG_ENDIAN for + target-independent code like the front ends, need performance testing + before switching completely to the target hook. */ +DEFHOOK_UNDOC +(words_big_endian, + "", + bool, (void), + targhook_words_big_endian) + +/* Likewise. */ +DEFHOOK_UNDOC +(float_words_big_endian, + "", + bool, (void), + targhook_float_words_big_endian) + /* True if the target supports decimal floating point. */ DEFHOOK (decimal_float_supported_p,