Message ID | 20120413171456.GA17593@intel.com |
---|---|
State | New |
Headers | show |
On Fri, Apr 13, 2012 at 7:14 PM, H.J. Lu <hongjiu.lu@intel.com> wrote: > This patch defines _ILP32 and __ILP32__ for x32 as specified by x32 psABI. > OK for trunk and 4.7 branch? > * config/i386/i386-c.c (ix86_target_macros): Define _ILP32 > and __ILP32__ for x32. OK. Thanks, Uros.
diff --git a/gcc/config/i386/i386-c.c b/gcc/config/i386/i386-c.c index 8adb3b4..49fd4d9 100644 --- a/gcc/config/i386/i386-c.c +++ b/gcc/config/i386/i386-c.c @@ -383,6 +383,11 @@ ix86_target_macros (void) cpp_define (parse_in, "__amd64__"); cpp_define (parse_in, "__x86_64"); cpp_define (parse_in, "__x86_64__"); + if (TARGET_X32) + { + cpp_define (parse_in, "_ILP32"); + cpp_define (parse_in, "__ILP32__"); + } } else {