public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
[parent not found: <bug-19815-4@http.gcc.gnu.org/bugzilla/>]
* [Bug other/19815] New: Documentation change - GCC Internals MODES_TIEABLE_P
@ 2005-02-08 15:03 andrewhutchinson at cox dot net
  2005-02-10 21:48 ` [Bug other/19815] " ericw at evcohs dot com
  0 siblings, 1 reply; 3+ messages in thread
From: andrewhutchinson at cox dot net @ 2005-02-08 15:03 UTC (permalink / raw)
  To: gcc-bugs

Documentation change - GCC Internals

The definition of MODES_TIEABLE_P is incorrect and has resulted in reduced
optimisation for the avr target (and perhaps others)

The definition is currently:

"A C expression that is nonzero if a value of mode mode1 is accessible in mode
mode2 without copying."

This part would be ok but is then detailed as :

"If HARD_REGNO_MODE_OK (r, mode1) and HARD_REGNO_MODE_OK (r, mode2) are always
the same for any r, then MODES_TIEABLE_P (mode1, mode2) should be nonzero. If
they differ for any r, you should define this macro to return zero unless some
other mechanism ensures the accessibility of the value in a narrower mode."

This second paragraph is too restrictive. 

MODES_TIEABLE_p may also be nonzero if r is accessible in any SMALLER mode.

In the particular example of the avr target, word or larger registers are
assigned even numbered  registers ONLY. Byte registers have no such restriction.
Because this does indeed fail the second paragraph criteria, MODE_TIEABLE_P has
been set 0=FALSE preventing byte operations on the word register and uneeded
register moves. It should have been set TRUE.

I was tempted to report this as AVR target bug - but the code is not really the
problem.

Note that the definition is often included in target header files as well as gcc
internal manual.

-- 
           Summary: Documentation change - GCC Internals MODES_TIEABLE_P
           Product: gcc
           Version: 3.4.3
            Status: UNCONFIRMED
          Severity: minor
          Priority: P2
         Component: other
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: andrewhutchinson at cox dot net
                CC: gcc-bugs at gcc dot gnu dot org


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


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

end of thread, other threads:[~2012-01-11 12:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-19815-7648@http.gcc.gnu.org/bugzilla/>
2009-08-19 11:57 ` [Bug other/19815] Documentation change - GCC Internals MODES_TIEABLE_P abnikant dot singh at atmel dot com
     [not found] <bug-19815-4@http.gcc.gnu.org/bugzilla/>
2012-01-11 12:47 ` rguenth at gcc dot gnu.org
2005-02-08 15:03 [Bug other/19815] New: " andrewhutchinson at cox dot net
2005-02-10 21:48 ` [Bug other/19815] " ericw at evcohs dot com

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