Re: RFC: PATCH: Add -maddress-mode=short|long for x86

2012-03-19 Thread H.J. Lu
On Sun, Mar 18, 2012 at 3:17 PM, Gerald Pfeifer  wrote:
> On Wed, 14 Mar 2012, H.J. Lu wrote:
>>> Apart from the above, at least invoke.texi does not define what an x32
>>> environment is.  Shouldn't that done somewhere (before this terminology
>>> is used)?
>> I am not sure where to put it.  In any case, here is a patch to update
>> GCC 4.7.0 changes with link to x32 website.
>
> Please add two "the"s, once for the ABI and once for the options;
> fine with this change.
>

Done.  Thanks.


-- 
H.J.


Re: RFC: PATCH: Add -maddress-mode=short|long for x86

2012-03-18 Thread Gerald Pfeifer
On Wed, 14 Mar 2012, H.J. Lu wrote:
>> Apart from the above, at least invoke.texi does not define what an x32
>> environment is.  Shouldn't that done somewhere (before this terminology
>> is used)?
> I am not sure where to put it.  In any case, here is a patch to update
> GCC 4.7.0 changes with link to x32 website.

Please add two "the"s, once for the ABI and once for the options;
fine with this change.

GeraldIndex: htdocs/gcc-4.7/changes.html
===
RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-4.7/changes.html,v
retrieving revision 1.96
diff -u -p -r1.96 changes.html
--- htdocs/gcc-4.7/changes.html	7 Mar 2012 14:15:35 -	1.96
+++ htdocs/gcc-4.7/changes.html	14 Mar 2012 22:31:50 -
@@ -720,6 +720,8 @@ int add_values (const __flash int *p, in
   for Windows mingw targets.
 Support for new AMD family 15h processors (Piledriver core) is now available
   through -march=bdver2 and -mtune=bdver2 options.
+Support for http://sites.google.com/site/x32abi/";>x32 psABI
+  is now available through -mx32 option.
 ...
   
 


Re: RFC: PATCH: Add -maddress-mode=short|long for x86

2012-03-14 Thread H.J. Lu
On Wed, Mar 14, 2012 at 2:57 PM, Gerald Pfeifer  wrote:
> On Wed, 14 Mar 2012, Uros Bizjak wrote:
>> I have also added Gerald to CC, to check if everything is OK with
>> added documentation.
>
> Joseph is better with that than I am, but I'll give it a try. :-)
>
> +@item -maddress-mode=long
> +@opindex maddress-mode=long
> +Generate code for long address mode.  It is only supported for 64-bit
> +and x32 environments.  This is the default address mode for 64-bit
> +environment.
>
> I cannot formally explain why, but would swap "It" and "This" in
> this paragraph and the other.
>
> In any case "64-bit environments" (Plural).
>
> Fine with these changes.

I checked in the updated patch.

>
> Apart from the above, at least invoke.texi does not define what an x32
> environment is.  Shouldn't that done somewhere (before this terminology
> is used)?
>

I am not sure where to put it.  In any case, here is a patch to update
GCC 4.7.0 changes with link to x32 website.


-- 
H.J.
Index: htdocs/gcc-4.7/changes.html
===
RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-4.7/changes.html,v
retrieving revision 1.96
diff -u -p -r1.96 changes.html
--- htdocs/gcc-4.7/changes.html	7 Mar 2012 14:15:35 -	1.96
+++ htdocs/gcc-4.7/changes.html	14 Mar 2012 22:31:50 -
@@ -720,6 +720,8 @@ int add_values (const __flash int *p, in
   for Windows mingw targets.
 Support for new AMD family 15h processors (Piledriver core) is now available
   through -march=bdver2 and -mtune=bdver2 options.
+Support for http://sites.google.com/site/x32abi/";>x32 psABI
+  is now available through -mx32 option.
 ...
   
 


Re: RFC: PATCH: Add -maddress-mode=short|long for x86

2012-03-14 Thread Gerald Pfeifer
On Wed, 14 Mar 2012, Uros Bizjak wrote:
> I have also added Gerald to CC, to check if everything is OK with
> added documentation.

Joseph is better with that than I am, but I'll give it a try. :-)

+@item -maddress-mode=long
+@opindex maddress-mode=long
+Generate code for long address mode.  It is only supported for 64-bit
+and x32 environments.  This is the default address mode for 64-bit
+environment.

I cannot formally explain why, but would swap "It" and "This" in
this paragraph and the other.

In any case "64-bit environments" (Plural).

Fine with these changes.


Apart from the above, at least invoke.texi does not define what an x32 
environment is.  Shouldn't that done somewhere (before this terminology
is used)?

Gerald


Re: RFC: PATCH: Add -maddress-mode=short|long for x86

2012-03-14 Thread Joseph S. Myers
On Wed, 14 Mar 2012, Uros Bizjak wrote:

> The patch is technically OK for mainline, Joseph - can you please
> review option stuff?

The option changes look fine to me.

-- 
Joseph S. Myers
jos...@codesourcery.com


Re: RFC: PATCH: Add -maddress-mode=short|long for x86

2012-03-14 Thread Uros Bizjak
On Mon, Mar 12, 2012 at 6:48 PM, H.J. Lu  wrote:

> Trunk can now use SImode or DImode for Pmode with -mx32.  Pmode == SImode
> will avoid many conversions from SImode to DImode:
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50797
>
> It will use 0x67 address size prefix instead.  This patch adds a new
> command line option, -maddress-mode=short|long, for x86.  Any comments?

I think this is good option, I as a developer will be able to
benchmark different approaches for new target with this flag.

> 2012-03-12  H.J. Lu  
>
>        * config/i386/i386-opts.h (pmode): New.
>
>        * config/i386/i386.c (ix86_option_override_internal): Properly
>        check and set ix86_pmode.
>
>        * config/i386/i386.h (Pmode): Check ix86_pmode instead of
>        TARGET_64BIT.
>
>        * config/i386/i386.opt (maddress-mode=): New.
>
>        * doc/invoke.texi: Document -maddress-mode=short|long for x86.

Please refer to PR target/50797 in the ChangeLog.

The patch is technically OK for mainline, Joseph - can you please
review option stuff?

I have also added Gerald to CC, to check if everything is OK with
added documentation.

Thanks,
Uros.