From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8012 invoked by alias); 9 Jul 2002 19:36:01 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 7993 invoked by uid 71); 9 Jul 2002 19:36:01 -0000 Resent-Date: 9 Jul 2002 19:36:01 -0000 Resent-Message-ID: <20020709193601.7992.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-To: nobody@gcc.gnu.org Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, martin@blom.org Received: (qmail 5517 invoked by uid 61); 9 Jul 2002 19:35:08 -0000 Message-Id: <20020709193508.5516.qmail@sources.redhat.com> Date: Tue, 09 Jul 2002 12:36:00 -0000 From: martin@blom.org Reply-To: martin@blom.org To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: target/7248: gcc 2.95.3 for m68k generates broken "inclusive or" code X-SW-Source: 2002-07/txt/msg00272.txt.bz2 List-Id: >Number: 7248 >Category: target >Synopsis: gcc 2.95.3 for m68k generates broken "inclusive or" code >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: wrong-code >Submitter-Id: net >Arrival-Date: Tue Jul 09 12:36:00 PDT 2002 >Closed-Date: >Last-Modified: >Originator: martin@blom.org >Release: gcc version 2.95.3 20010315 (release) >Organization: >Environment: AmigaOS or Linux cross compiler. >Description: The following test example outputs 0000000a:00000000 instead of 0000000a:ffffffff as one would expect. #include typedef unsigned long long Fixed64; void test( int a ) { Fixed64 f = ( (Fixed64) a << 32) | 0xffffffffULL; printf( "%08x:%08x\n", (long) (f >> 32), (long) (f & 0xffffffffULL) ); } int main( void ) { test( 10 ); } >How-To-Repeat: >Fix: --- config/m68k/m68k.md.orig Tue Jul 9 21:03:52 2002 +++ config/m68k/m68k.md Tue Jul 9 21:03:55 2002 @@ -3813,23 +3813,23 @@ if (GET_CODE (operands[0]) == REG) operands[0] = gen_rtx_REG (SImode, REGNO (operands[0]) + 1); else operands[0] = adj_offsettable_operand (operands[0], 4); switch (INTVAL (lo)) { case 0 : break; case -1 : /* FIXME : a scratch register would be welcome here if operand[0] is not a register */ - output_asm_insn (\"move%.l %#-1,%R0\", operands); + output_asm_insn (\"move%.l %#-1,%0\", operands); break; default : { rtx xoperands[3]; xoperands[0] = operands[0]; xoperands[2] = lo; output_asm_insn (output_iorsi3 (xoperands), xoperands); } } return \"\"; >Release-Note: >Audit-Trail: >Unformatted: