[Bug target/52698] -maddress-mode=long doesn't work

hjl.tools at gmail dot com gcc-bugzilla@gcc.gnu.org
Sat Mar 24 15:25:00 GMT 2012


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52698

--- Comment #2 from H.J. Lu <hjl.tools at gmail dot com> 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.



More information about the Gcc-bugs mailing list