From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28437 invoked by alias); 24 Mar 2012 15:20:36 -0000 Received: (qmail 28426 invoked by uid 22791); 24 Mar 2012 15:20:36 -0000 X-SWARE-Spam-Status: No, hits=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,TW_XF 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; Sat, 24 Mar 2012 15:20:23 +0000 From: "hjl.tools at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/52698] -maddress-mode=long doesn't work Date: Sat, 24 Mar 2012 15:25:00 -0000 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: ASSIGNED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: ubizjak at gmail dot com X-Bugzilla-Target-Milestone: 4.8.0 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 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: 2012-03/txt/msg02121.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52698 --- Comment #2 from H.J. Lu 2012-03-24 15:20:06 UTC --- Created attachment 26974 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26974 A patch I am testing this patch with diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index a21f2da..586be4b 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -3181,7 +3181,7 @@ ix86_option_override_internal (bool main_args_p) TARGET_64BIT ? "64" : "32"); } else - ix86_pmode = TARGET_LP64 ? PMODE_DI : PMODE_SI; + ix86_pmode = TARGET_64BIT ? PMODE_DI : PMODE_SI; if (!global_options_set.x_ix86_abi) ix86_abi = DEFAULT_ABI; I will run GCC testsuite as well as glibc build/test. As I indicated before, we can use "mov{l}\t{%%fs:0, %k0|%k0, DWORD PTR fs:0}" to load thread pointer, which is an unsigned integral value with range from 0 to 0xffffffff into both SImode and DImode register. There is no need for zero-extend.