From patchwork Wed May 18 17:30:37 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Uros Bizjak X-Patchwork-Id: 96203 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 CB01B1007D8 for ; Thu, 19 May 2011 03:30:56 +1000 (EST) Received: (qmail 31477 invoked by alias); 18 May 2011 17:30:53 -0000 Received: (qmail 31467 invoked by uid 22791); 18 May 2011 17:30:52 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, RFC_ABUSE_POST, TW_ZJ, T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org Received: from mail-pw0-f47.google.com (HELO mail-pw0-f47.google.com) (209.85.160.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 18 May 2011 17:30:37 +0000 Received: by pwj9 with SMTP id 9so931627pwj.20 for ; Wed, 18 May 2011 10:30:37 -0700 (PDT) MIME-Version: 1.0 Received: by 10.142.249.39 with SMTP id w39mr1210226wfh.96.1305739837282; Wed, 18 May 2011 10:30:37 -0700 (PDT) Received: by 10.142.108.7 with HTTP; Wed, 18 May 2011 10:30:37 -0700 (PDT) Date: Wed, 18 May 2011 19:30:37 +0200 Message-ID: Subject: [PATCH, i386]: Trivial, split long asm templates in TLS patterns From: Uros Bizjak To: gcc-patches@gcc.gnu.org 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 Hello! 2011-05-18 Uros Bizjak * config/i386/i386.md (*tls_global_dynamic_32_gnu): Split asm template. (*tls_global_dynamic_64): Ditto. (*tls_local_dynamic_base_32_gnu): Ditto. (*tls_local_dynamic_base_64): Ditto. (tls_initial_exec_64_sun): Ditto. No functional changes. Patch was tested on x86_64-pc-linux-gnu {,-m32}, committed to mainline SVN. Uros. Index: i386.md =================================================================== --- i386.md (revision 173864) +++ i386.md (working copy) @@ -12364,7 +12364,11 @@ (clobber (match_scratch:SI 5 "=c")) (clobber (reg:CC FLAGS_REG))] "!TARGET_64BIT && TARGET_GNU_TLS" - "lea{l}\t{%a2@tlsgd(,%1,1), %0|%0, %a2@tlsgd[%1*1]}\;call\t%P3" +{ + output_asm_insn + ("lea{l}\t{%a2@tlsgd(,%1,1), %0|%0, %a2@tlsgd[%1*1]}", operands); + return "call\t%P3"; +} [(set_attr "type" "multi") (set_attr "length" "12")]) @@ -12387,7 +12391,14 @@ (unspec:DI [(match_operand:DI 1 "tls_symbolic_operand" "")] UNSPEC_TLS_GD)] "TARGET_64BIT" - { return ASM_BYTE "0x66\n\tlea{q}\t{%a1@tlsgd(%%rip), %%rdi|rdi, %a1@tlsgd[rip]}\n" ASM_SHORT "0x6666\n\trex64\n\tcall\t%P2"; } +{ + fputs (ASM_BYTE "0x66\n", asm_out_file); + output_asm_insn + ("lea{q}\t{%a1@tlsgd(%%rip), %%rdi|rdi, %a1@tlsgd[rip]}", operands); + fputs (ASM_SHORT "0x6666\n", asm_out_file); + fputs ("\trex64\n", asm_out_file); + return "call\t%P2"; +} [(set_attr "type" "multi") (set_attr "length" "16")]) @@ -12410,7 +12421,11 @@ (clobber (match_scratch:SI 4 "=c")) (clobber (reg:CC FLAGS_REG))] "!TARGET_64BIT && TARGET_GNU_TLS" - "lea{l}\t{%&@tlsldm(%1), %0|%0, %&@tlsldm[%1]}\;call\t%P2" +{ + output_asm_insn + ("lea{l}\t{%&@tlsldm(%1), %0|%0, %&@tlsldm[%1]}", operands); + return "call\t%P2"; +} [(set_attr "type" "multi") (set_attr "length" "11")]) @@ -12432,7 +12447,11 @@ (match_operand:DI 2 "" ""))) (unspec:DI [(const_int 0)] UNSPEC_TLS_LD_BASE)] "TARGET_64BIT" - "lea{q}\t{%&@tlsld(%%rip), %%rdi|rdi, %&@tlsld[rip]}\;call\t%P1" +{ + output_asm_insn + ("lea{q}\t{%&@tlsld(%%rip), %%rdi|rdi, %&@tlsld[rip]}", operands); + return "call\t%P1"; +} [(set_attr "type" "multi") (set_attr "length" "12")]) @@ -12507,7 +12526,11 @@ UNSPEC_TLS_IE_SUN)) (clobber (reg:CC FLAGS_REG))] "TARGET_64BIT && TARGET_SUN_TLS" - "mov{q}\t{%%fs:0, %0|%0, QWORD PTR fs:0}\n\tadd{q}\t{%a1@gottpoff(%%rip), %0|%0, %a1@gottpoff[rip]}" +{ + output_asm_insn + ("mov{q}\t{%%fs:0, %0|%0, QWORD PTR fs:0}", operands) + return "add{q}\t{%a1@gottpoff(%%rip), %0|%0, %a1@gottpoff[rip]}"; +} [(set_attr "type" "multi")]) ;; GNU2 TLS patterns can be split.