public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/49866] New: [4.6 Regression] -mcmodel=large tail call fails to assemble
@ 2011-07-27 11:40 jakub at gcc dot gnu.org
  2011-07-27 11:42 ` [Bug target/49866] " jakub at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-07-27 11:40 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: [4.6 Regression] -mcmodel=large tail call fails to
                    assemble
           Product: gcc
           Version: 4.6.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: jakub@gcc.gnu.org
                CC: uros@gcc.gnu.org
            Target: x86_64-linux


void fn (void *, int, int);
int fn2 (void);
void baz (int);

static void
foo (void *x, int y)
{
  int i;
  for (i = 0; i < y; i++)
    fn (x, fn2 (), i);
}

void
bar (int u, int v, int w, void *x)
{
  baz (u);
  foo (x, w);
  baz (u);
}

gcc -O2 -mcmodel=large -c rh725516.c
fails to assemble, we end up with
        jmp     *$baz
This got fixed on the trunk with
http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=173797
but for the backport it would be certainly preferrable if we got a smaller and
less riskier fix than that.
In r166110 it was (likely incorrectly for large model, but at least it
assembled) emitting jmp baz, I expect the change came with
http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=166119


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug target/49866] [4.6 Regression] -mcmodel=large tail call fails to assemble
  2011-07-27 11:40 [Bug target/49866] New: [4.6 Regression] -mcmodel=large tail call fails to assemble jakub at gcc dot gnu.org
@ 2011-07-27 11:42 ` jakub at gcc dot gnu.org
  2011-07-27 11:47 ` ubizjak at gmail dot com
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-07-27 11:42 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|                            |4.7.0
   Target Milestone|---                         |4.6.2
      Known to fail|                            |4.6.1


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug target/49866] [4.6 Regression] -mcmodel=large tail call fails to assemble
  2011-07-27 11:40 [Bug target/49866] New: [4.6 Regression] -mcmodel=large tail call fails to assemble jakub at gcc dot gnu.org
  2011-07-27 11:42 ` [Bug target/49866] " jakub at gcc dot gnu.org
@ 2011-07-27 11:47 ` ubizjak at gmail dot com
  2011-07-27 12:09 ` jakub at gcc dot gnu.org
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: ubizjak at gmail dot com @ 2011-07-27 11:47 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Uros Bizjak <ubizjak at gmail dot com> 2011-07-27 11:46:50 UTC ---
(In reply to comment #0)

> This got fixed on the trunk with
> http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=173797
> but for the backport it would be certainly preferrable if we got a smaller and
> less riskier fix than that.

The change you are referring to is fairly mechanical, so I see no problem to
backport it entirely.  But the backport should be handled with care, of course.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug target/49866] [4.6 Regression] -mcmodel=large tail call fails to assemble
  2011-07-27 11:40 [Bug target/49866] New: [4.6 Regression] -mcmodel=large tail call fails to assemble jakub at gcc dot gnu.org
  2011-07-27 11:42 ` [Bug target/49866] " jakub at gcc dot gnu.org
  2011-07-27 11:47 ` ubizjak at gmail dot com
@ 2011-07-27 12:09 ` jakub at gcc dot gnu.org
  2011-07-27 12:15 ` ubizjak at gmail dot com
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-07-27 12:09 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-07-27 12:09:11 UTC ---
Wouldn't it be safer to just introduce the z constraint and replace all s
constraints with z constraints in *call_insn_operand predicated operands?
No call insn pattern reorganization/merging etc.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug target/49866] [4.6 Regression] -mcmodel=large tail call fails to assemble
  2011-07-27 11:40 [Bug target/49866] New: [4.6 Regression] -mcmodel=large tail call fails to assemble jakub at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2011-07-27 12:09 ` jakub at gcc dot gnu.org
@ 2011-07-27 12:15 ` ubizjak at gmail dot com
  2011-07-27 12:52 ` jakub at gcc dot gnu.org
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: ubizjak at gmail dot com @ 2011-07-27 12:15 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Uros Bizjak <ubizjak at gmail dot com> 2011-07-27 12:14:49 UTC ---
(In reply to comment #2)
> Wouldn't it be safer to just introduce the z constraint and replace all s
> constraints with z constraints in *call_insn_operand predicated operands?

It depends whether you miss a "s" or not. ;)

As said, it is your call...


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug target/49866] [4.6 Regression] -mcmodel=large tail call fails to assemble
  2011-07-27 11:40 [Bug target/49866] New: [4.6 Regression] -mcmodel=large tail call fails to assemble jakub at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2011-07-27 12:15 ` ubizjak at gmail dot com
@ 2011-07-27 12:52 ` jakub at gcc dot gnu.org
  2011-07-27 12:56 ` ubizjak at gmail dot com
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-07-27 12:52 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2011.07.27 12:51:38
         AssignedTo|unassigned at gcc dot       |jakub at gcc dot gnu.org
                   |gnu.org                     |
     Ever Confirmed|0                           |1

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-07-27 12:51:38 UTC ---
Created attachment 24842
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24842
gcc46-pr49866.patch

Well, you are the i386 maintainer, not me.
Anyway, if you don't disagree here is what I'd try to bootstrap/regtest.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug target/49866] [4.6 Regression] -mcmodel=large tail call fails to assemble
  2011-07-27 11:40 [Bug target/49866] New: [4.6 Regression] -mcmodel=large tail call fails to assemble jakub at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2011-07-27 12:52 ` jakub at gcc dot gnu.org
@ 2011-07-27 12:56 ` ubizjak at gmail dot com
  2011-07-27 18:17 ` jakub at gcc dot gnu.org
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: ubizjak at gmail dot com @ 2011-07-27 12:56 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Uros Bizjak <ubizjak at gmail dot com> 2011-07-27 12:55:40 UTC ---
(In reply to comment #4)
> Created attachment 24842 [details]
> gcc46-pr49866.patch
> 
> Well, you are the i386 maintainer, not me.
> Anyway, if you don't disagree here is what I'd try to bootstrap/regtest.

Looks OK to me (in fact, trivially correct).


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug target/49866] [4.6 Regression] -mcmodel=large tail call fails to assemble
  2011-07-27 11:40 [Bug target/49866] New: [4.6 Regression] -mcmodel=large tail call fails to assemble jakub at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2011-07-27 12:56 ` ubizjak at gmail dot com
@ 2011-07-27 18:17 ` jakub at gcc dot gnu.org
  2011-07-27 18:20 ` jakub at gcc dot gnu.org
  2011-07-27 19:24 ` jakub at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-07-27 18:17 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-07-27 18:17:20 UTC ---
Author: jakub
Date: Wed Jul 27 18:17:15 2011
New Revision: 176841

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=176841
Log:
    PR target/49866
    * config/i386/i386.md (*call_pop_1_vzeroupper, *call_pop_1,
    *sibcall_pop_1_vzeroupper, *sibcall_pop_1, *call_1_vzeroupper,
    *call_1, *sibcall_1_vzeroupper, *sibcall_1, *call_1_rex64_vzeroupper,
    *call_1_rex64, *call_1_rex64_ms_sysv_vzeroupper,
    *call_1_rex64_ms_sysv, *sibcall_1_rex64_vzeroupper,
    *sibcall_1_rex64, *call_value_pop_1_vzeroupper,
    *call_value_pop_1, *sibcall_value_pop_1_vzeroupper,
    *sibcall_value_pop_1, *call_value_1_vzeroupper,
    *call_value_1, *sibcall_value_1_vzeroupper,
    *sibcall_value_1, *call_value_1_rex64_vzeroupper,
    *call_value_1_rex64, *call_value_1_rex64_ms_sysv_vzeroupper,
    *call_value_1_rex64_ms_sysv, *sibcall_value_1_rex64_vzeroupper,
    *sibcall_value_1_rex64): Use z constraint instead of s constraint.

    Backport from mainline
    2011-05-16  Uros Bizjak  <ubizjak@gmail.com>

        * config/i386/constraints.md (z): New constraint.
testsuite/
    * gcc.target/i386/pr49866.c: New test.

Added:
    branches/gcc-4_6-branch/gcc/testsuite/gcc.target/i386/pr49866.c
Modified:
    branches/gcc-4_6-branch/gcc/ChangeLog
    branches/gcc-4_6-branch/gcc/config/i386/constraints.md
    branches/gcc-4_6-branch/gcc/config/i386/i386.md
    branches/gcc-4_6-branch/gcc/config/rs6000/rs6000.c   (props changed)
    branches/gcc-4_6-branch/gcc/config/rs6000/rs6000.h   (props changed)
    branches/gcc-4_6-branch/gcc/testsuite/ChangeLog

Propchange: branches/gcc-4_6-branch/gcc/config/rs6000/rs6000.c
            ('svn:mergeinfo' removed)

Propchange: branches/gcc-4_6-branch/gcc/config/rs6000/rs6000.h
            ('svn:mergeinfo' removed)


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug target/49866] [4.6 Regression] -mcmodel=large tail call fails to assemble
  2011-07-27 11:40 [Bug target/49866] New: [4.6 Regression] -mcmodel=large tail call fails to assemble jakub at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2011-07-27 18:17 ` jakub at gcc dot gnu.org
@ 2011-07-27 18:20 ` jakub at gcc dot gnu.org
  2011-07-27 19:24 ` jakub at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-07-27 18:20 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-07-27 18:19:44 UTC ---
Author: jakub
Date: Wed Jul 27 18:19:40 2011
New Revision: 176842

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=176842
Log:
    PR target/49866
    * gcc.target/i386/pr49866.c: New test.

Added:
    trunk/gcc/testsuite/gcc.target/i386/pr49866.c
Modified:
    trunk/gcc/testsuite/ChangeLog


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug target/49866] [4.6 Regression] -mcmodel=large tail call fails to assemble
  2011-07-27 11:40 [Bug target/49866] New: [4.6 Regression] -mcmodel=large tail call fails to assemble jakub at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2011-07-27 18:20 ` jakub at gcc dot gnu.org
@ 2011-07-27 19:24 ` jakub at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-07-27 19:24 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED

--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-07-27 19:24:09 UTC ---
Fixed.


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2011-07-27 19:24 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-27 11:40 [Bug target/49866] New: [4.6 Regression] -mcmodel=large tail call fails to assemble jakub at gcc dot gnu.org
2011-07-27 11:42 ` [Bug target/49866] " jakub at gcc dot gnu.org
2011-07-27 11:47 ` ubizjak at gmail dot com
2011-07-27 12:09 ` jakub at gcc dot gnu.org
2011-07-27 12:15 ` ubizjak at gmail dot com
2011-07-27 12:52 ` jakub at gcc dot gnu.org
2011-07-27 12:56 ` ubizjak at gmail dot com
2011-07-27 18:17 ` jakub at gcc dot gnu.org
2011-07-27 18:20 ` jakub at gcc dot gnu.org
2011-07-27 19:24 ` jakub at gcc dot gnu.org

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).