From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23341 invoked by alias); 4 Apr 2005 18:10:33 -0000 Mailing-List: contact binutils-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sources.redhat.com Received: (qmail 23303 invoked from network); 4 Apr 2005 18:10:30 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 4 Apr 2005 18:10:30 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id j34IATeq010150 for ; Mon, 4 Apr 2005 14:10:29 -0400 Received: from potter.sfbay.redhat.com (potter.sfbay.redhat.com [172.16.27.15]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id j34IATO25277; Mon, 4 Apr 2005 14:10:29 -0400 Received: from dhcp-172-16-25-252.sfbay.redhat.com (dhcp-172-16-25-252.sfbay.redhat.com [172.16.25.252]) by potter.sfbay.redhat.com (8.12.8/8.12.8) with ESMTP id j34IARKi012775; Mon, 4 Apr 2005 14:10:27 -0400 Subject: Re: "Error: constant too large" on mips gas From: Eric Christopher To: "Maciej W. Rozycki" Cc: Atsushi Nemoto , binutils@sources.redhat.com In-Reply-To: References: <20050401.123528.122254594.nemoto@toshiba-tops.co.jp> <20050404.175833.115610647.nemoto@toshiba-tops.co.jp> Content-Type: text/plain Date: Mon, 04 Apr 2005 18:10:00 -0000 Message-Id: <1112638226.5320.0.camel@localhost.localdomain> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-SW-Source: 2005-04/txt/msg00100.txt.bz2 > And here is the result of the above assumptions, together with test suite > updates this time. :-) Tested with no regressions for mips64el-linux-gnu. > > gas/: > 2005-04-04 Maciej W. Rozycki > > * config/tc-mips.c (IS_ZEXT_32BIT_NUM): New macro. > (normalize_address_expr): New function to sign-extend address > offsets that fit into 32 bits in 32-bit mode. > (macro_build_ldst_constoffset): Use normalize_address_expr() > instead of a handcoded sequence. > (load_register): Likewise. Report oversized numbers in a useful > way. > (macro) [ld_st, ldd_std]: Reject all oversized offsets, not only > for constant addresses. Report oversized numbers in a useful way. > (mips_ip): Use normalize_address_expr() for addresses. > > gas/testsuite/: > 2005-04-04 Maciej W. Rozycki > > * gas/mips/ldstla-32.s: Exclude offsets that are now meant to fail > and include more instructions/offsets that are meant to succeed. > Use $4 instead $3 to avoid register dependencies. > * gas/mips/ldstla-32.d: Update accordingly. > * gas/mips/ldstla-32-shared.d: Likewise. > * gas/mips/ldstla-32-1.s: New test for offsets that are meant to > fail. > * gas/mips/ldstla-32-1.l: Stderr output for the new test. > * gas/mips/mips.exp: Run the new test (twice). > > OK to apply? OK. Some documentation on this probably wouldn't be amiss either :) -eric