This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/52441] SH Target: Double sign/zero extensions for function arguments


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

--- Comment #1 from Kazumoto Kojima <kkojima at gcc dot gnu.org> 2012-03-01 22:00:14 UTC ---
(In reply to comment #0)
> The sign/zero extensions in the caller (_xx) are not emitted when using the
> original Renesas ABI (-mrenesas), which is correct.

Correct for efficiency, but not for robustness :-)

> Maybe this double sign/zero extension has some historical reason for some ABI
> backwards compatibilities in the GNU SH ABI... but shouldn't it actually be
> safe to leave out the sign/zero extensions on one side of the function call
> (either caller or callee)?

I don't know any historical reason but x86 uses that double sign/zero
extension too.  It wouldn't be a safe ABI change.  There can exist hand
written functions depending that behavior.  It's too late to change
the default behavior, I think.  Of course, you can add a new -m option
or function attribute changing it, though it shouldn't be default for
non Renesas ABI.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]