From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6963 invoked by alias); 12 Jun 2007 14:17:36 -0000 Received: (qmail 6952 invoked by uid 22791); 12 Jun 2007 14:17:35 -0000 X-Spam-Check-By: sourceware.org Received: from mtagate4.de.ibm.com (HELO mtagate4.de.ibm.com) (195.212.29.153) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 12 Jun 2007 14:17:32 +0000 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate4.de.ibm.com (8.13.8/8.13.8) with ESMTP id l5CEHTY1132126 for ; Tue, 12 Jun 2007 14:17:29 GMT Received: from d12av02.megacenter.de.ibm.com (d12av02.megacenter.de.ibm.com [9.149.165.228]) by d12nrmr1607.megacenter.de.ibm.com (8.13.8/8.13.8/NCO v8.3) with ESMTP id l5CEHTSU3436692 for ; Tue, 12 Jun 2007 16:17:29 +0200 Received: from d12av02.megacenter.de.ibm.com (loopback [127.0.0.1]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id l5CEHTFA025945 for ; Tue, 12 Jun 2007 16:17:29 +0200 Received: from tuxmaker.boeblingen.de.ibm.com (tuxmaker.boeblingen.de.ibm.com [9.152.85.9]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.12.11) with SMTP id l5CEHTaU025942; Tue, 12 Jun 2007 16:17:29 +0200 Message-Id: <200706121417.l5CEHTaU025942@d12av02.megacenter.de.ibm.com> Received: by tuxmaker.boeblingen.de.ibm.com (sSMTP sendmail emulation); Tue, 12 Jun 2007 16:17:29 +0200 Subject: Re: [rfc] [2/2] Remove macros TARGET_{FLOAT,DOUBLE,LONG_DOUBLE}_{BIT|FORMAT} To: deuling@de.ibm.com (Markus Deuling) Date: Tue, 12 Jun 2007 14:17:00 -0000 From: "Ulrich Weigand" Cc: gdb-patches@sourceware.org (GDB Patches) In-Reply-To: <46692E72.7090004@de.ibm.com> from "Markus Deuling" at Jun 08, 2007 12:24:50 PM X-Mailer: ELM [version 2.5 PL2] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-06/txt/msg00162.txt.bz2 Markus Deuling wrote: > this patch removes following macros from gdbarch.sh: > > * TARGET_FLOAT_BIT > * TARGET_FLOAT_FORMAT > * TARGET_DOUBLE_BIT > * TARGET_DOUBLE_FORMAT > * TARGET_LONG_DOUBLE_BIT > * TARGET_LONG_DOUBLE_FORMAT /* NOTE: The new architecture variable is named ``current_gdbarch'' - so that macros such as TARGET_DOUBLE_BIT, when expanded, refer to + so that macros such as gdbarch_double_bit, when expanded, refer to the current local architecture and not the previous global architecture. This ensures that the new architectures initial values are not influenced by the previous architecture. Once Well, replacing the macro by a gdbarch function invalidates the whole point the comment is making ;-) You should either use another macro (that still is a macro) as example, or -once there are no macros left- remove that comment. + builtin_type_float = build_flt (gdbarch_float_bit (current_gdbarch), "float", + gdbarch_float_format (current_gdbarch)); + builtin_type_double = build_flt (gdbarch_double_bit (current_gdbarch), + "double", + gdbarch_double_format (current_gdbarch)); + builtin_type_long_double = build_flt (gdbarch_long_double_bit + (current_gdbarch), + "long double", + gdbarch_long_double_format + (current_gdbarch)); It might be nicer to move the built_flt to its own line builtin_type_long_double = build_fld (gdbarch_long_double_bit (current_gdbarch), ... Otherwise this is OK, thanks! Bye, Ulrich -- Dr. Ulrich Weigand GNU Toolchain for Linux on System z and Cell BE Ulrich.Weigand@de.ibm.com