public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "howarth at nitro dot med dot uc dot edu" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/42313] FAIL: gcc.target/i386/builtin-unreachable.c scan-assembler-not %e[bs]p on i686 darwin
Date: Sat, 04 Sep 2010 19:13:00 -0000	[thread overview]
Message-ID: <20100904191305.22625.qmail@sourceware.org> (raw)
In-Reply-To: <bug-42313-11113@http.gcc.gnu.org/bugzilla/>



------- Comment #8 from howarth at nitro dot med dot uc dot edu  2010-09-04 19:13 -------
(In reply to comment #7)
> I fixed the test case to not expect the unimplemented optimization in r157197,
> however, it would be nice to ensure the async signal handlers can handle
> unaligned stacks and to perform this optimization.  I'm fairly certain the
> signal handers have to cope as code gen can do:
> 
> _h:
>         subl    $12, %esp
>         movl    $1, %eax
>         addl    $12, %esp
>         ret
> 
> for int h () { return 1; } and certainly we can take a signal at _h+0, where
> esp isn't aligned.  Given that, we can omit sp alignments for leaf functions
> (and no tail calls either), even on machines where otherwise an alignment is
> required, as long as any variables on the stack are correctly aligned.
> 
> When this optimization is added, we can undo the r157197 change. 
> 

My proposed patch to fix PR36502...

http://gcc.gnu.org/ml/gcc-patches/2010-09/msg00237.html

that enables stack realignment on intel darwin also solves this PR as well.
Comparing the output from gcc trunk before and after my patch, I see...

--- builtin-unreachable.s       2010-09-04 15:12:40.000000000 -0400
+++ builtin-unreachable.trunk_patched   2010-09-04 15:02:45.000000000 -0400
@@ -3,11 +3,7 @@
        .globl _h
 _h:
 LFB0:
-       subl    $12, %esp
-LCFI0:
        movl    $1, %eax
-       addl    $12, %esp
-LCFI1:
        ret
 LFE0:
        .section
__TEXT,__eh_frame,coalesced,no_toc+strip_static_syms+live_support
@@ -39,16 +35,6 @@
        .set L$set$2,LFE0-LFB0
        .long L$set$2
        .byte   0
-       .byte   0x4
-       .set L$set$3,LCFI0-LFB0
-       .long L$set$3
-       .byte   0xe
-       .byte   0x10
-       .byte   0x4
-       .set L$set$4,LCFI1-LCFI0
-       .long L$set$4
-       .byte   0xe
-       .byte   0x4
        .align 2
 LEFDE1:
        .subsections_via_symbols


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42313


  parent reply	other threads:[~2010-09-04 19:13 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-06 20:11 [Bug testsuite/42313] New: " howarth at nitro dot med dot uc dot edu
2009-12-06 20:12 ` [Bug testsuite/42313] " howarth at nitro dot med dot uc dot edu
2009-12-06 20:13 ` howarth at nitro dot med dot uc dot edu
2009-12-07 17:27 ` daney at gcc dot gnu dot org
2009-12-08 14:13 ` howarth at nitro dot med dot uc dot edu
2009-12-08 17:34 ` daney at gcc dot gnu dot org
2009-12-08 19:51 ` [Bug target/42313] " pinskia at gcc dot gnu dot org
2010-03-03 16:56 ` mikestump at comcast dot net
2010-09-04 19:13 ` howarth at nitro dot med dot uc dot edu [this message]
2010-09-04 21:20 ` howarth at nitro dot med dot uc dot edu
2010-09-07 21:19 ` hjl at gcc dot gnu dot org
2010-09-08  1:05 ` howarth at nitro dot med dot uc dot edu

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=20100904191305.22625.qmail@sourceware.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@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).