From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25076 invoked by alias); 21 Jul 2011 16:03:36 -0000 Received: (qmail 25064 invoked by uid 22791); 21 Jul 2011 16:03:35 -0000 X-SWARE-Spam-Status: No, hits=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 21 Jul 2011 16:03:22 +0000 From: "hjl.tools at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/49798] .quad instead of .long is used for address for x32 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: hjl.tools at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Thu, 21 Jul 2011 16:03:00 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2011-07/txt/msg01766.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49798 --- Comment #8 from H.J. Lu 2011-07-21 16:03:20 UTC --- (In reply to comment #7) > IRA generates > > (insn 13 3 18 2 (set (reg/v:DI 21 xmm0 [orig:63 v ] [63]) > (mem/u/c/i:DI (symbol_ref/u:DI ("*.LC0") [flags 0x2]) [0 S8 A64])) > x.i:12 62 {*movdi_internal_rex64} > (expr_list:REG_EQUIV (symbol_ref:DI ("xxxx") [flags 0x40] 0x7f4068bbc140 xxxx>) > (nil))) > > This requires zero-extending 32bit address to 64bit. I am not sure how we can express it in constant pool beyond what we have today. I can add a new assembler directive, xquad, so that we do something similar to /* Target hook for assembling integer objects. The sparc version has special handling for aligned DI-mode objects. */ static bool sparc_assemble_integer (rtx x, unsigned int size, int aligned_p) { /* ??? We only output .xword's for symbols and only then in environments where the assembler can handle them. */ if (aligned_p && size == 8 && (GET_CODE (x) != CONST_INT && GET_CODE (x) != CONST_DOUBLE)) { if (TARGET_V9) { assemble_integer_with_op ("\t.xword\t", x); return true; } else { assemble_aligned_integer (4, const0_rtx); assemble_aligned_integer (4, x); return true; } } return default_assemble_integer (x, size, aligned_p); }