From: Uros Bizjak <ubizjak@gmail.com>
To: "H.J. Lu" <hjl.tools@gmail.com>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: PATCH [1/n] X32: Add initial -x32 support
Date: Tue, 05 Jul 2011 15:21:00 -0000 [thread overview]
Message-ID: <CAFULd4ZvcB+kiXRFv+GkM67FZOCYdyOkYEaS61Z8CNh=ENEf-Q@mail.gmail.com> (raw)
In-Reply-To: <20110705143920.GA25294@intel.com>
On Tue, Jul 5, 2011 at 4:39 PM, H.J. Lu <hongjiu.lu@intel.com> wrote:
> I'd like to start submitting a series of patches to enable x32:
>
> https://sites.google.com/site/x32abi/
>
> The GCC x32 branch is very stable. There are no unexpected failures in
> C, C++, Fortran and Objective C testsuites. SPEC CPU 2K/2006 compile
> and run correctly at -O2 and -O3.
>
> More than 90% of changes are in x86 backend. I have submitted non-x86
> backend patches. Most of them have been reviewed and checked in. Only
> 4 patches are pending for review/approval.
>
> This is the first x86 backend patch to support x32. By default, x32 is
> disabled and x32 run-time support isn't required. OK for trunk?
Please strip out --enable-ia32 stuff, it complicates things ATM. I
assume that --enable-x32 applies only to 64bit targets, so this part
> @@ -1232,7 +1232,17 @@ i[34567]86-*-linux* | i[34567]86-*-kfreebsd*-gnu | i[34567]86-*-knetbsd*-gnu | i
> if test x$enable_targets = xall; then
> tm_file="${tm_file} i386/x86-64.h i386/gnu-user64.h i386/linux64.h"
> tm_defines="${tm_defines} TARGET_BI_ARCH=1"
> - tmake_file="${tmake_file} i386/t-linux64"
> + case x${enable_x32}${enable_ia32} in
> + xyesyes)
> + tmake_file="${tmake_file} i386/t-linux-x32"
> + ;;
> + xyesno)
> + tmake_file="${tmake_file} i386/t-linux64-x32"
> + ;;
> + *)
> + tmake_file="${tmake_file} i386/t-linux64"
> + ;;
> + esac
should be simplified to something:
if (enable_x32)
tmake_file = "... i386/t-linux64-x32"
else
tmake_file = "... i386/t-linux64"
> diff --git a/gcc/config/i386/gnu-user64.h b/gcc/config/i386/gnu-user64.h
> index b069975..954f3b2 100644
> --- a/gcc/config/i386/gnu-user64.h
> +++ b/gcc/config/i386/gnu-user64.h
> @@ -58,25 +58,31 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
>
> #if TARGET_64BIT_DEFAULT
> #define SPEC_32 "m32"
> -#define SPEC_64 "!m32"
> +#define SPEC_64 "m32|mx32:;"
> +#define SPEC_X32 "mx32"
> #else
> -#define SPEC_32 "!m64"
> +#define SPEC_32 "m64|mx32:;"
> #define SPEC_64 "m64"
> +#define SPEC_X32 "mx32"
> #endif
>
> #undef ASM_SPEC
> -#define ASM_SPEC "%{" SPEC_32 ":--32} %{" SPEC_64 ":--64} \
> +#define ASM_SPEC "%{" SPEC_32 ":--32} \
> + %{" SPEC_64 ":--64} \
> + %{" SPEC_X32 ":--x32} \
> %{!mno-sse2avx:%{mavx:-msse2avx}} %{msse2avx:%{!mavx:-msse2avx}}"
Are you sure that above is correct? AFAICS, you are enabling SPEC_64
for m32 in case of TARGET_64BIT_DEFAULT.
> /* SSE4.1 defines round instructions */
> #define OPTION_MASK_ISA_ROUND OPTION_MASK_ISA_SSE4_1
> @@ -517,8 +519,8 @@ extern const char *host_detect_local_cpu (int argc, const char **argv);
> #define OPT_ARCH64 "!m32"
> #define OPT_ARCH32 "m32"
> #else
> -#define OPT_ARCH64 "m64"
> -#define OPT_ARCH32 "!m64"
> +#define OPT_ARCH64 "m64|mx32"
> +#define OPT_ARCH32 "m64|mx32:;"
> #endif
Same here.
Uros.
next prev parent reply other threads:[~2011-07-05 15:16 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-05 19:55 PATCH [1/n]: " H.J. Lu
2011-06-06 15:47 ` Uros Bizjak
2011-06-07 15:47 ` Joseph S. Myers
2011-06-07 18:54 ` H.J. Lu
2011-06-07 19:19 ` Joseph S. Myers
2011-06-07 15:59 ` Joseph S. Myers
2011-06-07 19:11 ` H.J. Lu
2011-06-07 19:20 ` Joseph S. Myers
2011-06-07 22:02 ` H.J. Lu
2011-06-14 17:52 ` H.J. Lu
2011-07-05 14:42 ` PATCH [1/n] X32: " H.J. Lu
2011-07-05 15:21 ` Uros Bizjak [this message]
2011-07-05 17:59 ` H.J. Lu
2011-07-05 18:18 ` Uros Bizjak
2011-07-05 19:09 ` H.J. Lu
2011-07-05 19:09 ` Joseph S. Myers
2011-07-05 20:07 ` Uros Bizjak
2011-07-06 14:50 ` H.J. Lu
2011-07-06 15:03 ` Richard Guenther
2011-07-06 16:40 ` H.J. Lu
2011-07-07 13:03 ` H.J. Lu
2011-07-07 13:08 ` Uros Bizjak
2011-07-07 13:27 ` Paolo Bonzini
2011-07-07 15:10 ` H.J. Lu
2011-07-07 15:14 ` Uros Bizjak
2011-07-07 15:38 ` Paolo Bonzini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAFULd4ZvcB+kiXRFv+GkM67FZOCYdyOkYEaS61Z8CNh=ENEf-Q@mail.gmail.com' \
--to=ubizjak@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=hjl.tools@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).