public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/52737] New: [avr]: -mtiny-stack shall not influence multilib selection
@ 2012-03-27 11:28 gjl at gcc dot gnu.org
  2012-03-27 11:34 ` [Bug target/52737] " gjl at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: gjl at gcc dot gnu.org @ 2012-03-27 11:28 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 52737
           Summary: [avr]: -mtiny-stack shall not influence multilib
                    selection
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: gjl@gcc.gnu.org
            Target: avr


The current (4.7.0) behaviour is:

-mtiny-stack acts as multilib-option for 16-bit SP targets in avr2 and avr25,
i.e. with that switch will trigger multi-lib from ./tiny-stack resp.
./avr25/tiny-stack

The problem is that the tiny-stack multilibs mix 16-bit SP targets that are
treated as 8-bit SP, and targets with 8-bit SP.

The currect implementation assumes SP.H = 0 in tiny-stack mlibs in order to
properly initialize the frame pointer, e.g. in __prologue_saves.

This is no good for 16-bit SP targets.

Solution:

Restore the behaviour for the 16-bit SP targets as was, i.e. -mtiny-stack does
not affect multilib selection for these targets, but if specified on the
command line, the resulting code will only change SP.L and assume SP.H never
changes.

For the 8-bit SP targets, -mtiny-stack should remain as in 4.7.0, i.e. used
internally to trigger tiny-stack multilibs. Specifying -mtiny-stack on the
command line will be redundant for these targets and have no effect.


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

* [Bug target/52737] [avr]: -mtiny-stack shall not influence multilib selection
  2012-03-27 11:28 [Bug target/52737] New: [avr]: -mtiny-stack shall not influence multilib selection gjl at gcc dot gnu.org
@ 2012-03-27 11:34 ` gjl at gcc dot gnu.org
  2012-03-28  8:54 ` gjl at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: gjl at gcc dot gnu.org @ 2012-03-27 11:34 UTC (permalink / raw)
  To: gcc-bugs

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

Georg-Johann Lay <gjl at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P5
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2012-03-27
         AssignedTo|unassigned at gcc dot       |gjl at gcc dot gnu.org
                   |gnu.org                     |
             Blocks|                            |51345
     Ever Confirmed|0                           |1
   Target Milestone|---                         |4.7.1
      Known to fail|                            |4.7.0


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

* [Bug target/52737] [avr]: -mtiny-stack shall not influence multilib selection
  2012-03-27 11:28 [Bug target/52737] New: [avr]: -mtiny-stack shall not influence multilib selection gjl at gcc dot gnu.org
  2012-03-27 11:34 ` [Bug target/52737] " gjl at gcc dot gnu.org
@ 2012-03-28  8:54 ` gjl at gcc dot gnu.org
  2012-03-28  9:07 ` gjl at gcc dot gnu.org
  2012-03-28 10:34 ` gjl at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: gjl at gcc dot gnu.org @ 2012-03-28  8:54 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Georg-Johann Lay <gjl at gcc dot gnu.org> 2012-03-28 08:31:46 UTC ---
Author: gjl
Date: Wed Mar 28 08:31:26 2012
New Revision: 185907

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=185907
Log:
    PR target/52737
    * contrib/gcc_update (files_and_dependencies):
    Remove gcc/config/avr/t-multilib from touch data.

gcc/
    PR target/52737
    * config.gcc (tm_file): Remove avr/multilib.h.

    * doc/invoke.texi (AVR Options): Adjust
    documentation of -mtiny-stack.

    * config/avr/genmultilib.awk: Remove code to generate multilib.h.
    (BEGIN): Use -msp8 as multilib option instead of -mtiny-stack.
    * config/avr/t-avr: Remove generation of multilib.h.
    * config/avr/t-multilib: Regenerate.
    * config/avr/multilib.h: Remove.
    * config/avr/avr.opt (-msp8): New option.
    (avr_sp8): New variable.
    * config/avr/driver-avr.c (avr_device_to_sp8): New function.
    * config/avr/avr.h (AVR_HAVE_SPH): New define.
    (AVR_HAVE_8BIT_SP): Also set by avr_sp8 i.e. -msp8.
    (avr_device_to_sp8): New prototype.
    (EXTRA_SPEC_FUNCTIONS): Add { "device_to_sp8", avr_device_to_sp8 }
    (DRIVER_SELF_SPECS): New define.
    * config/avr/avr-c.c (avr_cpu_cpp_builtins): New built-in defines:
    __AVR_SP8__, __AVR_HAVE_SPH__.
    * config/avr/avr.c (output_movhi): Use AVR_HAVE_SPH instead of
    AVR_HAVE_8BIT_SP to decide if SP_H is present.
    (avr_file_start): Ditto.

libgcc/
    PR target/52737
    * config/avr/lib1funcs.S: Use __AVR_HAVE_SPH__ for SP_H checks
    instead of __AVR_HAVE_8BIT_SP__.


Removed:
    trunk/gcc/config/avr/multilib.h
Modified:
    trunk/ChangeLog
    trunk/contrib/gcc_update
    trunk/gcc/ChangeLog
    trunk/gcc/config.gcc
    trunk/gcc/config/avr/avr-c.c
    trunk/gcc/config/avr/avr.c
    trunk/gcc/config/avr/avr.h
    trunk/gcc/config/avr/avr.opt
    trunk/gcc/config/avr/driver-avr.c
    trunk/gcc/config/avr/genmultilib.awk
    trunk/gcc/config/avr/t-avr
    trunk/gcc/config/avr/t-multilib
    trunk/gcc/doc/invoke.texi
    trunk/libgcc/ChangeLog
    trunk/libgcc/config/avr/lib1funcs.S


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

* [Bug target/52737] [avr]: -mtiny-stack shall not influence multilib selection
  2012-03-27 11:28 [Bug target/52737] New: [avr]: -mtiny-stack shall not influence multilib selection gjl at gcc dot gnu.org
  2012-03-27 11:34 ` [Bug target/52737] " gjl at gcc dot gnu.org
  2012-03-28  8:54 ` gjl at gcc dot gnu.org
@ 2012-03-28  9:07 ` gjl at gcc dot gnu.org
  2012-03-28 10:34 ` gjl at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: gjl at gcc dot gnu.org @ 2012-03-28  9:07 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Georg-Johann Lay <gjl at gcc dot gnu.org> 2012-03-28 09:04:49 UTC ---
Author: gjl
Date: Wed Mar 28 09:04:11 2012
New Revision: 185908

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=185908
Log:
    Backport from 2012-03-28 mainline r185907.

    PR target/52737
    * contrib/gcc_update (files_and_dependencies):
    Remove gcc/config/avr/t-multilib from touch data.

gcc/
    Backport from 2012-03-28 mainline r185907.

    PR target/52737
    * config.gcc (tm_file): Remove avr/multilib.h.

    * doc/invoke.texi (AVR Options): Adjust
    documentation of -mtiny-stack.

    * config/avr/genmultilib.awk: Remove code to generate multilib.h.
    (BEGIN): Use -msp8 as multilib option instead of -mtiny-stack.
    * config/avr/t-avr: Remove generation of multilib.h.
    * config/avr/t-multilib: Regenerate.
    * config/avr/multilib.h: Remove.
    * config/avr/avr.opt (-msp8): New option.
    (avr_sp8): New variable.
    * config/avr/driver-avr.c (avr_device_to_sp8): New function.
    * config/avr/avr.h (AVR_HAVE_SPH): New define.
    (AVR_HAVE_8BIT_SP): Also set by avr_sp8 i.e. -msp8.
    (avr_device_to_sp8): New prototype.
    (EXTRA_SPEC_FUNCTIONS): Add { "device_to_sp8", avr_device_to_sp8 }
    (DRIVER_SELF_SPECS): New define.
    * config/avr/avr-c.c (avr_cpu_cpp_builtins): New built-in defines:
    __AVR_SP8__, __AVR_HAVE_SPH__.
    * config/avr/avr.c (output_movhi): Use AVR_HAVE_SPH instead of
    AVR_HAVE_8BIT_SP to decide if SP_H is present.
    (avr_file_start): Ditto.

libgcc/
    Backport from 2012-03-28 mainline r185907.

    PR target/52737
    * config/avr/lib1funcs.S: Use __AVR_HAVE_SPH__ for SP_H checks
    instead of __AVR_HAVE_8BIT_SP__.


Removed:
    branches/gcc-4_7-branch/gcc/config/avr/multilib.h
Modified:
    branches/gcc-4_7-branch/ChangeLog
    branches/gcc-4_7-branch/contrib/gcc_update
    branches/gcc-4_7-branch/gcc/ChangeLog
    branches/gcc-4_7-branch/gcc/config.gcc
    branches/gcc-4_7-branch/gcc/config/avr/avr-c.c
    branches/gcc-4_7-branch/gcc/config/avr/avr.c
    branches/gcc-4_7-branch/gcc/config/avr/avr.h
    branches/gcc-4_7-branch/gcc/config/avr/avr.opt
    branches/gcc-4_7-branch/gcc/config/avr/driver-avr.c
    branches/gcc-4_7-branch/gcc/config/avr/genmultilib.awk
    branches/gcc-4_7-branch/gcc/config/avr/t-avr
    branches/gcc-4_7-branch/gcc/config/avr/t-multilib
    branches/gcc-4_7-branch/gcc/doc/invoke.texi
    branches/gcc-4_7-branch/libgcc/ChangeLog
    branches/gcc-4_7-branch/libgcc/config/avr/lib1funcs.S


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

* [Bug target/52737] [avr]: -mtiny-stack shall not influence multilib selection
  2012-03-27 11:28 [Bug target/52737] New: [avr]: -mtiny-stack shall not influence multilib selection gjl at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2012-03-28  9:07 ` gjl at gcc dot gnu.org
@ 2012-03-28 10:34 ` gjl at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: gjl at gcc dot gnu.org @ 2012-03-28 10:34 UTC (permalink / raw)
  To: gcc-bugs

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

Georg-Johann Lay <gjl at gcc dot gnu.org> changed:

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

--- Comment #3 from Georg-Johann Lay <gjl at gcc dot gnu.org> 2012-03-28 10:27:36 UTC ---
Fixed in 4.7.1


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

end of thread, other threads:[~2012-03-28 10:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-27 11:28 [Bug target/52737] New: [avr]: -mtiny-stack shall not influence multilib selection gjl at gcc dot gnu.org
2012-03-27 11:34 ` [Bug target/52737] " gjl at gcc dot gnu.org
2012-03-28  8:54 ` gjl at gcc dot gnu.org
2012-03-28  9:07 ` gjl at gcc dot gnu.org
2012-03-28 10:34 ` gjl 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).