public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/15782] New: m68k_output_mi_thunk emits wrong code for ColdFire
@ 2004-06-02 20:25 peter at the-baradas dot com
2004-06-02 20:29 ` [Bug target/15782] [3.4 only] " pinskia at gcc dot gnu dot org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: peter at the-baradas dot com @ 2004-06-02 20:25 UTC (permalink / raw)
To: gcc-bugs
m68k_output_mi_thunk generats an adjustment of the first parameter on the stack
and calls off to the target function. This adjustment is done using addq/subq
for values in the range of 1-8, but fo values outside that range, it generates
'add.l #<imm>,4(%sp)' which is valid for m68k, but invalid for ColdFire. The
suggested fix for ColdFire is to load the value into %d0, and *then* emit 'add.l
%d0,4(%sp)'.
The following code triggers this bug when compiled with:
m68k-elf-g++ -m5307 -O
class FooA {
public:
virtual ~FooA () = 0;
int data[100];
};
class FooB {
public:
virtual void foo1 () = 0;
void fooB () {foo1 ();}
int data[100];
};
class FooC : public FooA, public FooB {
public:
virtual void foo1 () {}
};
FooC* Test ()
{
FooC* foc = new FooC;
foc->fooB ();
}
--
Summary: m68k_output_mi_thunk emits wrong code for ColdFire
Product: gcc
Version: 3.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: target
AssignedTo: bernie at develer dot com
ReportedBy: peter at the-baradas dot com
CC: gcc-bugs at gcc dot gnu dot org,peter at the-baradas dot
com
GCC target triplet: m68k-elf
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15782
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/15782] [3.4 only] m68k_output_mi_thunk emits wrong code for ColdFire
2004-06-02 20:25 [Bug target/15782] New: m68k_output_mi_thunk emits wrong code for ColdFire peter at the-baradas dot com
@ 2004-06-02 20:29 ` pinskia at gcc dot gnu dot org
2004-06-02 20:32 ` peter at the-baradas dot com
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-06-02 20:29 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-06-02 20:29 -------
Confirmed, patch is around somewhere, I cannot find it right now (but I am not trying too hard).
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Ever Confirmed| |1
Keywords| |wrong-code
Last reconfirmed|0000-00-00 00:00:00 |2004-06-02 20:29:31
date| |
Summary|m68k_output_mi_thunk emits |[3.4 only]
|wrong code for ColdFire |m68k_output_mi_thunk emits
| |wrong code for ColdFire
Target Milestone|--- |3.4.1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15782
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/15782] [3.4 only] m68k_output_mi_thunk emits wrong code for ColdFire
2004-06-02 20:25 [Bug target/15782] New: m68k_output_mi_thunk emits wrong code for ColdFire peter at the-baradas dot com
2004-06-02 20:29 ` [Bug target/15782] [3.4 only] " pinskia at gcc dot gnu dot org
@ 2004-06-02 20:32 ` peter at the-baradas dot com
2004-06-03 3:45 ` mmitchel at gcc dot gnu dot org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: peter at the-baradas dot com @ 2004-06-02 20:32 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From peter at the-baradas dot com 2004-06-02 20:32 -------
The patch for this can be found at:
http://gcc.gnu.org/ml/gcc/2004-05/msg01353.html
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15782
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/15782] [3.4 only] m68k_output_mi_thunk emits wrong code for ColdFire
2004-06-02 20:25 [Bug target/15782] New: m68k_output_mi_thunk emits wrong code for ColdFire peter at the-baradas dot com
2004-06-02 20:29 ` [Bug target/15782] [3.4 only] " pinskia at gcc dot gnu dot org
2004-06-02 20:32 ` peter at the-baradas dot com
@ 2004-06-03 3:45 ` mmitchel at gcc dot gnu dot org
2004-06-03 4:03 ` cvs-commit at gcc dot gnu dot org
2004-06-03 4:04 ` bernie at develer dot com
4 siblings, 0 replies; 6+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-06-03 3:45 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From mmitchel at gcc dot gnu dot org 2004-06-03 03:45 -------
OK for 3 4.1.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15782
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/15782] [3.4 only] m68k_output_mi_thunk emits wrong code for ColdFire
2004-06-02 20:25 [Bug target/15782] New: m68k_output_mi_thunk emits wrong code for ColdFire peter at the-baradas dot com
` (2 preceding siblings ...)
2004-06-03 3:45 ` mmitchel at gcc dot gnu dot org
@ 2004-06-03 4:03 ` cvs-commit at gcc dot gnu dot org
2004-06-03 4:04 ` bernie at develer dot com
4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-06-03 4:03 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-06-03 04:03 -------
Subject: Bug 15782
CVSROOT: /cvs/gcc
Module name: gcc
Branch: gcc-3_4-branch
Changes by: bernie@gcc.gnu.org 2004-06-03 04:02:49
Modified files:
gcc : ChangeLog
gcc/config/m68k: m68k.c
Log message:
PR target/15782
* config/m68k/m68k.c(m68k_output_mi_thunk): For ColdFire, use %d0 as
a scratch to perform an add to memory.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=2.2326.2.465&r2=2.2326.2.466
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/m68k/m68k.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.123.2.1&r2=1.123.2.2
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15782
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/15782] [3.4 only] m68k_output_mi_thunk emits wrong code for ColdFire
2004-06-02 20:25 [Bug target/15782] New: m68k_output_mi_thunk emits wrong code for ColdFire peter at the-baradas dot com
` (3 preceding siblings ...)
2004-06-03 4:03 ` cvs-commit at gcc dot gnu dot org
@ 2004-06-03 4:04 ` bernie at develer dot com
4 siblings, 0 replies; 6+ messages in thread
From: bernie at develer dot com @ 2004-06-03 4:04 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From bernie at develer dot com 2004-06-03 04:04 -------
Patch installed in both mailine and gcc-3_4-branch.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15782
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2004-06-03 4:04 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-02 20:25 [Bug target/15782] New: m68k_output_mi_thunk emits wrong code for ColdFire peter at the-baradas dot com
2004-06-02 20:29 ` [Bug target/15782] [3.4 only] " pinskia at gcc dot gnu dot org
2004-06-02 20:32 ` peter at the-baradas dot com
2004-06-03 3:45 ` mmitchel at gcc dot gnu dot org
2004-06-03 4:03 ` cvs-commit at gcc dot gnu dot org
2004-06-03 4:04 ` bernie at develer 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).