public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/55301] New: [SH] broken sp_switch function attribute
@ 2012-11-13  0:07 olegendo at gcc dot gnu.org
  2013-01-16  8:25 ` [Bug target/55301] " chrbr at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: olegendo at gcc dot gnu.org @ 2012-11-13  0:07 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 55301
           Summary: [SH] broken sp_switch function attribute
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: olegendo@gcc.gnu.org
            Target: sh*-*-*


The example from the sp_switch function attribute documentation:

void* alt_stack;

void f (void) __attribute__ ((interrupt_handler, sp_switch ("alt_stack")));

void f (void)
{
}

results in

sh_tmp.cpp: In function 'void f()':
sh_tmp.cpp:9:1: error: unrecognizable insn:
(insn 8 3 9 2 (parallel [
            (const_int 1 [0x1])
            (mem/u/c:SI (label_ref 0) [0 S4 A32])
        ]) sh_tmp.cpp:8 -1
     (nil))
sh_tmp.cpp:9:1: internal compiler error: in extract_insn, at recog.c:2109

This happens on 4.8, 4.7 branch and 4.6 branch.


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

* [Bug target/55301] [SH] broken sp_switch function attribute
  2012-11-13  0:07 [Bug target/55301] New: [SH] broken sp_switch function attribute olegendo at gcc dot gnu.org
@ 2013-01-16  8:25 ` chrbr at gcc dot gnu.org
  2013-01-16  8:31 ` chrbr at gcc dot gnu.org
  2013-01-16  8:32 ` chrbr at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: chrbr at gcc dot gnu.org @ 2013-01-16  8:25 UTC (permalink / raw)
  To: gcc-bugs


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

chrbr at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |chrbr at gcc dot gnu.org

--- Comment #1 from chrbr at gcc dot gnu.org 2013-01-16 08:24:49 UTC ---
missing:

2013-01-12  DJ Delorie  <dj@redhat.com>

    * config/sh/sh.md (UNSPECV_SP_SWITCH_B): New.
    (UNSPECV_SP_SWITCH_E): New.
    (sp_switch_1): Change to an unspec.
    (sp_switch_2): Change to an unspec.  Don't use post-inc when we
    replace $r15.

but when applied :

/tmp/cc9Bqh88.s: Assembler messages:
/tmp/cc9Bqh88.s:11: Error: pcrel too far


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

* [Bug target/55301] [SH] broken sp_switch function attribute
  2012-11-13  0:07 [Bug target/55301] New: [SH] broken sp_switch function attribute olegendo at gcc dot gnu.org
  2013-01-16  8:25 ` [Bug target/55301] " chrbr at gcc dot gnu.org
@ 2013-01-16  8:31 ` chrbr at gcc dot gnu.org
  2013-01-16  8:32 ` chrbr at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: chrbr at gcc dot gnu.org @ 2013-01-16  8:31 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #2 from chrbr at gcc dot gnu.org 2013-01-16 08:30:05 UTC ---
Author: chrbr
Date: Wed Jan 16 08:29:54 2013
New Revision: 195230

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=195230
Log:
PR target/55301
* config/sh/sh.c (sh_expand_prologue): Postpone new_stack mem symbol.
(broken_move): Handle UNSPECV_SP_SWITCH_B.
* config/sh/sh.md (sp_switch_1): Use set (reg:SI SP_REG).

* config/sh/sh.md (UNSPECV_SP_SWITCH_B): New.
(UNSPECV_SP_SWITCH_E): New.
(sp_switch_1): Change to an unspec.
(sp_switch_2): Change to an unspec.  Don't use post-inc when we
replace $r15.

* gcc.target/sh/sh-switch.c: New testcase.


Added:
    trunk/gcc/testsuite/gcc.target/sh/sp-switch.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/sh/sh.c
    trunk/gcc/config/sh/sh.md
    trunk/gcc/testsuite/ChangeLog


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

* [Bug target/55301] [SH] broken sp_switch function attribute
  2012-11-13  0:07 [Bug target/55301] New: [SH] broken sp_switch function attribute olegendo at gcc dot gnu.org
  2013-01-16  8:25 ` [Bug target/55301] " chrbr at gcc dot gnu.org
  2013-01-16  8:31 ` chrbr at gcc dot gnu.org
@ 2013-01-16  8:32 ` chrbr at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: chrbr at gcc dot gnu.org @ 2013-01-16  8:32 UTC (permalink / raw)
  To: gcc-bugs


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

chrbr at gcc dot gnu.org changed:

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

--- Comment #3 from chrbr at gcc dot gnu.org 2013-01-16 08:31:38 UTC ---
Fixed in trunk @ 195230.


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

end of thread, other threads:[~2013-01-16  8:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-13  0:07 [Bug target/55301] New: [SH] broken sp_switch function attribute olegendo at gcc dot gnu.org
2013-01-16  8:25 ` [Bug target/55301] " chrbr at gcc dot gnu.org
2013-01-16  8:31 ` chrbr at gcc dot gnu.org
2013-01-16  8:32 ` chrbr 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).