From patchwork Sun Aug 26 23:03:55 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Segher Boessenkool X-Patchwork-Id: 180097 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 3F84B2C00D7 for ; Mon, 27 Aug 2012 09:05:48 +1000 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1346627149; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: From:To:Cc:Subject:Date:Message-Id:Mailing-List:Precedence: List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender: Delivered-To; bh=jc9fHprOtvwMcPRQhnxp9E3Vofg=; b=ZcHidrCbhtHOdCW iJIj2M+9Dh94rL6dTUR/J8EP2rqeMjYe0Rpjadtim8fid/J4/1VhKhjvxDTvfi1B wtmDdDJsXW81PI/GX7pri/xoHYpuuJStYzD8fi7OR8v8NcMBLHhCTuup6sXbHVmn 2zfxhO7eCFhbpcAsXxGf7bBnOJAo= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Received:From:To:Cc:Subject:Date:Message-Id:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=t7FNU73r8WiGlY8uKv9gl0z1JUbnS+iZ99w0yhy8KYHJ30ATRKHVxy5pjsgvIm klBkYe3D9jylTxSO9YGiJf6KLp1Klz+xEHHIaudIEwM+U6hZmmkJ51mdoLU/O12h ikQd9qpF/XwG/o9feuKzKFV5KKpKMXGl6t3aCcWfMrDtE=; Received: (qmail 872 invoked by alias); 26 Aug 2012 23:05:44 -0000 Received: (qmail 859 invoked by uid 22791); 26 Aug 2012 23:05:42 -0000 X-SWARE-Spam-Status: No, hits=-1.4 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, SARE_MSGID_LONG40 X-Spam-Check-By: sourceware.org Received: from gcc1-power7.osuosl.org (HELO gcc1-power7.osuosl.org) (140.211.15.137) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 26 Aug 2012 23:05:27 +0000 Received: from gcc1-power7.osuosl.org (localhost [127.0.0.1]) by gcc1-power7.osuosl.org (8.14.5/8.14.5) with ESMTP id q7QN4DkU035895; Sun, 26 Aug 2012 16:04:13 -0700 Received: (from segher@localhost) by gcc1-power7.osuosl.org (8.14.5/8.14.5/Submit) id q7QN4BKF035890; Sun, 26 Aug 2012 16:04:11 -0700 From: Segher Boessenkool To: gcc-patches@gcc.gnu.org Cc: dje.gcc@gmail.com, Segher Boessenkool Subject: [PATCH] Remove RS6000_CALL_GLUE Date: Sun, 26 Aug 2012 16:03:55 -0700 Message-Id: <6fecc95c6df13ad7227053f8b1afa1919a868dfb.1346022145.git.segher@kernel.crashing.org> X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org On all supported targets, plain "nop" is the correct thing to use ("cror 31,31,31" was for POWER). Tested on powerpc64-linux --enable-languages=c,c++,fortran; no regressions. Okay for mainline? Segher 2012-08-26 Segher Boessenkool gcc/ * config/rs6000/aix43.h (RS6000_CALL_GLUE): Delete. * config/rs6000/aix51.h (RS6000_CALL_GLUE): Delete. * config/rs6000/aix52.h (RS6000_CALL_GLUE): Delete. * config/rs6000/aix53.h (RS6000_CALL_GLUE): Delete. * config/rs6000/aix61.h (RS6000_CALL_GLUE): Delete. * config/rs6000/freebsd64.h (RS6000_CALL_GLUE): Delete. * config/rs6000/linux64.h (RS6000_CALL_GLUE): Delete. * config/rs6000/rs6000.c (print_operand) ['.']: Delete. * config/rs6000/rs6000.h (RS6000_CALL_GLUE): Delete. * config/rs6000/rs6000.md (tls_gd_aix): Replace %. with nop. (tls_gd_call_aix): Ditto. (tls_ld_aix): Ditto. (tls_ld_call_aix): Ditto. (call_nonlocal_aix32): Ditto. (call_nonlocal_aix64): Ditto. (call_value_nonlocal_aix32): Ditto. (call_value_nonlocal_aix64): Ditto. --- gcc/config/rs6000/aix43.h | 6 ------ gcc/config/rs6000/aix51.h | 6 ------ gcc/config/rs6000/aix52.h | 6 ------ gcc/config/rs6000/aix53.h | 6 ------ gcc/config/rs6000/aix61.h | 6 ------ gcc/config/rs6000/freebsd64.h | 4 ---- gcc/config/rs6000/linux64.h | 4 ---- gcc/config/rs6000/rs6000.c | 6 ------ gcc/config/rs6000/rs6000.h | 4 ---- gcc/config/rs6000/rs6000.md | 22 ++++++++++++---------- 10 files changed, 12 insertions(+), 58 deletions(-) diff --git a/gcc/config/rs6000/aix43.h b/gcc/config/rs6000/aix43.h index c1a69dc..8ff2111 100644 --- a/gcc/config/rs6000/aix43.h +++ b/gcc/config/rs6000/aix43.h @@ -142,12 +142,6 @@ do { \ #undef PTRDIFF_TYPE #define PTRDIFF_TYPE "long int" -/* AIX 4 uses PowerPC nop (ori 0,0,0) instruction as call glue for PowerPC - and "cror 31,31,31" for POWER architecture. */ - -#undef RS6000_CALL_GLUE -#define RS6000_CALL_GLUE "nop" - /* AIX 4.2 and above provides initialization and finalization function support from linker command line. */ #undef HAS_INIT_SECTION diff --git a/gcc/config/rs6000/aix51.h b/gcc/config/rs6000/aix51.h index 6ea30c1..d62d3fb 100644 --- a/gcc/config/rs6000/aix51.h +++ b/gcc/config/rs6000/aix51.h @@ -146,12 +146,6 @@ do { \ #undef WCHAR_TYPE_SIZE #define WCHAR_TYPE_SIZE (!TARGET_64BIT ? 16 : 32) -/* AIX V5 uses PowerPC nop (ori 0,0,0) instruction as call glue for PowerPC - and "cror 31,31,31" for POWER architecture. */ - -#undef RS6000_CALL_GLUE -#define RS6000_CALL_GLUE "nop" - /* AIX 4.2 and above provides initialization and finalization function support from linker command line. */ #undef HAS_INIT_SECTION diff --git a/gcc/config/rs6000/aix52.h b/gcc/config/rs6000/aix52.h index 1c9e77f..02b966d 100644 --- a/gcc/config/rs6000/aix52.h +++ b/gcc/config/rs6000/aix52.h @@ -158,12 +158,6 @@ do { \ #undef WCHAR_TYPE_SIZE #define WCHAR_TYPE_SIZE (!TARGET_64BIT ? 16 : 32) -/* AIX V5 uses PowerPC nop (ori 0,0,0) instruction as call glue for PowerPC - and "cror 31,31,31" for POWER architecture. */ - -#undef RS6000_CALL_GLUE -#define RS6000_CALL_GLUE "nop" - /* AIX 4.2 and above provides initialization and finalization function support from linker command line. */ #undef HAS_INIT_SECTION diff --git a/gcc/config/rs6000/aix53.h b/gcc/config/rs6000/aix53.h index d1a99e9..870eb06 100644 --- a/gcc/config/rs6000/aix53.h +++ b/gcc/config/rs6000/aix53.h @@ -156,12 +156,6 @@ do { \ #undef WCHAR_TYPE_SIZE #define WCHAR_TYPE_SIZE (!TARGET_64BIT ? 16 : 32) -/* AIX V5 uses PowerPC nop (ori 0,0,0) instruction as call glue for PowerPC - and "cror 31,31,31" for POWER architecture. */ - -#undef RS6000_CALL_GLUE -#define RS6000_CALL_GLUE "nop" - /* AIX 4.2 and above provides initialization and finalization function support from linker command line. */ #undef HAS_INIT_SECTION diff --git a/gcc/config/rs6000/aix61.h b/gcc/config/rs6000/aix61.h index 663777c..9216899 100644 --- a/gcc/config/rs6000/aix61.h +++ b/gcc/config/rs6000/aix61.h @@ -157,12 +157,6 @@ do { \ #undef WCHAR_TYPE_SIZE #define WCHAR_TYPE_SIZE (!TARGET_64BIT ? 16 : 32) -/* AIX V5 uses PowerPC nop (ori 0,0,0) instruction as call glue for PowerPC - and "cror 31,31,31" for POWER architecture. */ - -#undef RS6000_CALL_GLUE -#define RS6000_CALL_GLUE "nop" - /* AIX 4.2 and above provides initialization and finalization function support from linker command line. */ #undef HAS_INIT_SECTION diff --git a/gcc/config/rs6000/freebsd64.h b/gcc/config/rs6000/freebsd64.h index 909f703..d434ace 100644 --- a/gcc/config/rs6000/freebsd64.h +++ b/gcc/config/rs6000/freebsd64.h @@ -316,10 +316,6 @@ extern int dot_symbols; #undef ASM_APP_OFF #define ASM_APP_OFF "#NO_APP\n" -/* PowerPC no-op instruction. */ -#undef RS6000_CALL_GLUE -#define RS6000_CALL_GLUE (TARGET_64BIT ? "nop" : "cror 31,31,31") - /* Function profiling bits */ #undef RS6000_MCOUNT #define RS6000_MCOUNT "_mcount" diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h index 7c516eb..8c32301 100644 --- a/gcc/config/rs6000/linux64.h +++ b/gcc/config/rs6000/linux64.h @@ -417,10 +417,6 @@ extern int dot_symbols; #undef ASM_APP_OFF #define ASM_APP_OFF "#NO_APP\n" -/* PowerPC no-op instruction. */ -#undef RS6000_CALL_GLUE -#define RS6000_CALL_GLUE (TARGET_64BIT ? "nop" : "cror 31,31,31") - #undef RS6000_MCOUNT #define RS6000_MCOUNT "_mcount" diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 6c58307..b06ec75 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -14627,12 +14627,6 @@ print_operand (FILE *file, rtx x, int code) switch (code) { - case '.': - /* Write out an instruction after the call which may be replaced - with glue code by the loader. This depends on the AIX version. */ - asm_fprintf (file, RS6000_CALL_GLUE); - return; - /* %a is output_address. */ case 'A': diff --git a/gcc/config/rs6000/rs6000.h b/gcc/config/rs6000/rs6000.h index 4e33611..b968802 100644 --- a/gcc/config/rs6000/rs6000.h +++ b/gcc/config/rs6000/rs6000.h @@ -2186,10 +2186,6 @@ extern char rs6000_reg_names[][8]; /* register names (0 vs. %r0). */ {"vs56", 101},{"vs57", 102},{"vs58", 103},{"vs59", 104}, \ {"vs60", 105},{"vs61", 106},{"vs62", 107},{"vs63", 108} } -/* Text to write out after a CALL that may be replaced by glue code by - the loader. This depends on the AIX version. */ -#define RS6000_CALL_GLUE "cror 31,31,31" - /* This is how to output an element of a case-vector that is relative. */ #define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \ diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md index d5ffd81..5dae300 100644 --- a/gcc/config/rs6000/rs6000.md +++ b/gcc/config/rs6000/rs6000.md @@ -9814,9 +9814,10 @@ (define_insn_and_split "tls_gd_aix" "HAVE_AS_TLS && DEFAULT_ABI == ABI_AIX" { if (TARGET_CMODEL != CMODEL_SMALL) - return "addis %0,%1,%2@got@tlsgd@ha\;addi %0,%0,%2@got@tlsgd@l\;bl %z3\;%."; + return "addis %0,%1,%2@got@tlsgd@ha\;addi %0,%0,%2@got@tlsgd@l\;" + "bl %z3\;nop"; else - return "addi %0,%1,%2@got@tlsgd\;bl %z3\;%."; + return "addi %0,%1,%2@got@tlsgd\;bl %z3\;nop"; } "&& TARGET_TLS_MARKERS" [(set (match_dup 0) @@ -9919,7 +9920,7 @@ (define_insn "*tls_gd_call_aix" UNSPEC_TLSGD) (clobber (reg:SI LR_REGNO))] "HAVE_AS_TLS && DEFAULT_ABI == ABI_AIX && TARGET_TLS_MARKERS" - "bl %z1(%3@tlsgd)\;%." + "bl %z1(%3@tlsgd)\;nop" [(set_attr "type" "branch") (set_attr "length" "8")]) @@ -9953,9 +9954,10 @@ (define_insn_and_split "tls_ld_aix" "HAVE_AS_TLS && DEFAULT_ABI == ABI_AIX" { if (TARGET_CMODEL != CMODEL_SMALL) - return "addis %0,%1,%&@got@tlsld@ha\;addi %0,%0,%&@got@tlsld@l\;bl %z2\;%."; + return "addis %0,%1,%&@got@tlsld@ha\;addi %0,%0,%&@got@tlsld@l\;" + "bl %z2\;nop"; else - return "addi %0,%1,%&@got@tlsld\;bl %z2\;%."; + return "addi %0,%1,%&@got@tlsld\;bl %z2\;nop"; } "&& TARGET_TLS_MARKERS" [(set (match_dup 0) @@ -10051,7 +10053,7 @@ (define_insn "*tls_ld_call_aix" (unspec:TLSmode [(const_int 0)] UNSPEC_TLSLD) (clobber (reg:SI LR_REGNO))] "HAVE_AS_TLS && DEFAULT_ABI == ABI_AIX && TARGET_TLS_MARKERS" - "bl %z1(%&@tlsld)\;%." + "bl %z1(%&@tlsld)\;nop" [(set_attr "type" "branch") (set_attr "length" "8")]) @@ -10873,7 +10875,7 @@ (define_insn "*call_nonlocal_aix32" "TARGET_32BIT && DEFAULT_ABI == ABI_AIX && (INTVAL (operands[2]) & CALL_LONG) == 0" - "bl %z0\;%." + "bl %z0\;nop" [(set_attr "type" "branch") (set_attr "length" "8")]) @@ -10885,7 +10887,7 @@ (define_insn "*call_nonlocal_aix64" "TARGET_64BIT && DEFAULT_ABI == ABI_AIX && (INTVAL (operands[2]) & CALL_LONG) == 0" - "bl %z0\;%." + "bl %z0\;nop" [(set_attr "type" "branch") (set_attr "length" "8")]) @@ -10898,7 +10900,7 @@ (define_insn "*call_value_nonlocal_aix32" "TARGET_32BIT && DEFAULT_ABI == ABI_AIX && (INTVAL (operands[3]) & CALL_LONG) == 0" - "bl %z1\;%." + "bl %z1\;nop" [(set_attr "type" "branch") (set_attr "length" "8")]) @@ -10911,7 +10913,7 @@ (define_insn "*call_value_nonlocal_aix64" "TARGET_64BIT && DEFAULT_ABI == ABI_AIX && (INTVAL (operands[3]) & CALL_LONG) == 0" - "bl %z1\;%." + "bl %z1\;nop" [(set_attr "type" "branch") (set_attr "length" "8")])