From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3580 invoked by alias); 9 Apr 2006 13:51:29 -0000 Received: (qmail 3562 invoked by uid 48); 9 Apr 2006 13:51:25 -0000 Date: Sun, 09 Apr 2006 13:51:00 -0000 Message-ID: <20060409135125.3561.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug target/27075] [4.1/4.2 Regression] Compiler generate incorrect assembler for __sync_fetch-* builtins on e500 aka SPE In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "amodra at bigpond dot net dot au" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2006-04/txt/msg00722.txt.bz2 List-Id: ------- Comment #8 from amodra at bigpond dot net dot au 2006-04-09 13:51 ------- This horrible hack should cure the problem, I think. The rationale is that spe.md uses %y only for evldd and evstdd insns, which load or store 8 bytes. The lock insns use %y for 4 byte quantities (e500 doesn't support 64-bit ldarx/stdcx. as far as I know). --- rs6000.c (revision 112800) +++ rs6000.c (working copy) @@ -10750,7 +10750,7 @@ print_operand (FILE *file, rtx x, int co tmp = XEXP (x, 0); - if (TARGET_E500) + if (TARGET_E500 && GET_MODE_SIZE (GET_MODE (x)) == 8) { /* Handle [reg]. */ if (GET_CODE (tmp) == REG) -- amodra at bigpond dot net dot au changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |amodra at bigpond dot net | |dot au http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27075