From: Uros Bizjak <ubizjak@gmail.com>
To: Eric Botcazou <ebotcazou@adacore.com>
Cc: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH, i386]: Extend TARGET_READ_MODIFY{,_WRITE} peepholes to all integer modes
Date: Fri, 29 Apr 2016 09:30:00 -0000 [thread overview]
Message-ID: <CAFULd4bTG7k32mP2R-Fp4jPAzatUUexq8LFLrz4UhkSigr41Vw@mail.gmail.com> (raw)
In-Reply-To: <3466465.kPQ0hp1mLX@polaris>
[-- Attachment #1: Type: text/plain, Size: 324 bytes --]
On Fri, Apr 29, 2016 at 9:58 AM, Eric Botcazou <ebotcazou@adacore.com> wrote:
>> We can put it back, but prehaps implemented as unspec, so it won't
>> interfere with peepholes?
>
> No strong opinion, as long as the final assembly is the same as before.
I'm testing the attached patch. Does it fix your ada failures?
Uros.
[-- Attachment #2: r.diff.txt --]
[-- Type: text/plain, Size: 1038 bytes --]
Index: i386.md
===================================================================
--- i386.md (revision 235620)
+++ i386.md (working copy)
@@ -88,6 +88,7 @@
UNSPEC_SET_GOT_OFFSET
UNSPEC_MEMORY_BLOCKAGE
UNSPEC_STACK_CHECK
+ UNSPEC_PROBE_STACK
;; TLS support
UNSPEC_TP
@@ -17552,6 +17553,23 @@
DONE;
})
+(define_expand "probe_stack"
+ [(parallel
+ [(set (match_operand 0 "memory_operand")
+ (unspec [(const_int 0)] UNSPEC_PROBE_STACK))
+ (clobber (reg:CC FLAGS_REG))])])
+
+;; Use OR for stack probes, this is shorter.
+(define_insn "*probe_stack_<mode>"
+ [(set (match_operand:W 0 "memory_operand" "=m")
+ (unspec:W [(const_int 0)] UNSPEC_PROBE_STACK))
+ (clobber (reg:CC FLAGS_REG))]
+ ""
+ "or{<imodesuffix>}\t{$0, %0|%0, 0}"
+ [(set_attr "type" "alu1")
+ (set_attr "mode" "<MODE>")
+ (set_attr "length_immediate" "1")])
+
(define_insn "adjust_stack_and_probe<mode>"
[(set (match_operand:P 0 "register_operand" "=r")
(unspec_volatile:P [(match_operand:P 1 "register_operand" "0")]
next prev parent reply other threads:[~2016-04-29 9:30 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-28 19:16 Uros Bizjak
2016-04-29 7:47 ` Eric Botcazou
2016-04-29 7:50 ` Uros Bizjak
2016-04-29 7:58 ` Eric Botcazou
2016-04-29 9:30 ` Uros Bizjak [this message]
2016-04-29 10:17 ` Eric Botcazou
2016-04-29 10:51 ` Uros Bizjak
2016-04-29 11:23 ` Eric Botcazou
2016-04-29 11:52 ` Uros Bizjak
2016-04-29 14:30 ` Eric Botcazou
2016-04-29 14:44 ` Uros Bizjak
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=CAFULd4bTG7k32mP2R-Fp4jPAzatUUexq8LFLrz4UhkSigr41Vw@mail.gmail.com \
--to=ubizjak@gmail.com \
--cc=ebotcazou@adacore.com \
--cc=gcc-patches@gcc.gnu.org \
/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).