public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug optimization/12249] ARM link register is not saved during 64-bit operation
2003-09-11 14:54 [Bug optimization/12249] New: ARM link register is not saved during 64-bit operation Peter_Hornung at siemens dot com
2003-09-11 14:54 ` [Bug optimization/12249] " Peter_Hornung at siemens dot com
@ 2003-09-11 14:54 ` rearnsha at gcc dot gnu dot org
2003-09-11 14:54 ` Peter_Hornung at siemens dot com
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: rearnsha at gcc dot gnu dot org @ 2003-09-11 14:54 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12249
rearnsha at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |WAITING
------- Additional Comments From rearnsha at gcc dot gnu dot org 2003-09-11 13:56 -------
a recent snapshot from the 3.3 branch gives
str r4, [sp, #-4]!
.LCFI0:
.LM2:
ldr r4, .L2
.LBB2:
umull r2, ip, r4, r1
ldr r1, .L2+4
ldmia r1, {r3-r4}
mov r1, ip, lsr #3
adds r2, r4, r1
adc r1, r3, #0
.LM3:
@ lr needed for prologue
.LM4:
ldmfd sp!, {r4}
b _ZN9CEventBug4waitEy
So I think this is fixed. Please can you try the 3.3.1 release.
R.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug optimization/12249] ARM link register is not saved during 64-bit operation
2003-09-11 14:54 [Bug optimization/12249] New: ARM link register is not saved during 64-bit operation Peter_Hornung at siemens dot com
2003-09-11 14:54 ` [Bug optimization/12249] " Peter_Hornung at siemens dot com
2003-09-11 14:54 ` rearnsha at gcc dot gnu dot org
@ 2003-09-11 14:54 ` Peter_Hornung at siemens dot com
2003-09-12 10:57 ` Peter_Hornung at siemens dot com
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Peter_Hornung at siemens dot com @ 2003-09-11 14:54 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12249
------- Additional Comments From Peter_Hornung at siemens dot com 2003-09-11 13:46 -------
LR is not used with -O2 or no optimization
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug optimization/12249] New: ARM link register is not saved during 64-bit operation
@ 2003-09-11 14:54 Peter_Hornung at siemens dot com
2003-09-11 14:54 ` [Bug optimization/12249] " Peter_Hornung at siemens dot com
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: Peter_Hornung at siemens dot com @ 2003-09-11 14:54 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12249
Summary: ARM link register is not saved during 64-bit operation
Product: gcc
Version: 3.3
Status: UNCONFIRMED
Severity: critical
Priority: P2
Component: optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: Peter_Hornung at siemens dot com
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i586-pc-linux-gnu
GCC host triplet: i586-pc-linux-gnu
GCC target triplet: arm-unknown-elf
this tiny c++ function returns to a invalid address because the register LR is
not saved before it is reused in the function:
extern "C" unsigned long long xxx;
class CEventBug
{
public:
CEventBug ();
unsigned int wait (unsigned long long endTime);
};
extern "C" unsigned int EventWaitForSignal (void* event, unsigned int
waitMillisec)
{
CEventBug* pEv = static_cast <CEventBug*> (event);
return pEv->wait (xxx + (waitMillisec / 10));
}
it is being compiled with this command line:
arm-elf-g++ -ansi -fno-rtti -ffor-scope -fno-exceptions -finline -Wall -W -Wno-
long-long -save-temps -fno-builtin -mcpu=arm7tdmi -mbig-endian -O3 -g -c -o
test.o test.cpp
arm-elf-objdump -d test.o results in this:
test.o: file format elf32-bigarm
Disassembly of section .text:
00000000 <EventWaitForSignal>:
0: e52d4004 str r4, [sp, -#4]!
4: e59f401c ldr r4, [pc, #1c] ; 28 <EventWaitForSignal+0x28>
8: e08e2194 umull r2, lr, r4, r1
c: e59f1018 ldr r1, [pc, #18] ; 2c <EventWaitForSignal+0x2c>
10: e8910018 ldmia r1, {r3, r4}
14: e1a011ae mov r1, lr, lsr #3
18: e0942001 adds r2, r4, r1
1c: e2a31000 adc r1, r3, #0 ; 0x0
20: e8bd0010 ldmia sp!, {r4}
24: eafffffe b 24 <EventWaitForSignal+0x24>
28: cccccccd stcgtl 12, cr12, [r12], #820
2c: 00000000 andeq r0, r0, r0
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug optimization/12249] ARM link register is not saved during 64-bit operation
2003-09-11 14:54 [Bug optimization/12249] New: ARM link register is not saved during 64-bit operation Peter_Hornung at siemens dot com
@ 2003-09-11 14:54 ` Peter_Hornung at siemens dot com
2003-09-11 14:54 ` rearnsha at gcc dot gnu dot org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Peter_Hornung at siemens dot com @ 2003-09-11 14:54 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12249
------- Additional Comments From Peter_Hornung at siemens dot com 2003-09-11 13:44 -------
Created an attachment (id=4738)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=4738&action=view)
preprocessor output
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug optimization/12249] ARM link register is not saved during 64-bit operation
2003-09-11 14:54 [Bug optimization/12249] New: ARM link register is not saved during 64-bit operation Peter_Hornung at siemens dot com
` (2 preceding siblings ...)
2003-09-11 14:54 ` Peter_Hornung at siemens dot com
@ 2003-09-12 10:57 ` Peter_Hornung at siemens dot com
2003-09-12 10:58 ` Peter_Hornung at siemens dot com
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Peter_Hornung at siemens dot com @ 2003-09-12 10:57 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12249
------- Additional Comments From Peter_Hornung at siemens dot com 2003-09-12 10:57 -------
is fixed in 3.3.1
thank you for the quick response!
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug optimization/12249] ARM link register is not saved during 64-bit operation
2003-09-11 14:54 [Bug optimization/12249] New: ARM link register is not saved during 64-bit operation Peter_Hornung at siemens dot com
` (3 preceding siblings ...)
2003-09-12 10:57 ` Peter_Hornung at siemens dot com
@ 2003-09-12 10:58 ` Peter_Hornung at siemens dot com
2003-09-12 11:04 ` rearnsha at gcc dot gnu dot org
2003-12-09 18:24 ` dhazeghi at yahoo dot com
6 siblings, 0 replies; 8+ messages in thread
From: Peter_Hornung at siemens dot com @ 2003-09-12 10:58 UTC (permalink / raw)
To: gcc-bugs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1647 bytes --]
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12249
------- Additional Comments From Peter_Hornung at siemens dot com 2003-09-12 10:58 -------
Subject: AW: ARM link register is not saved durin
g 64-bit operation
is fixed in 3.3.1
thank you for the quick response!
Peter
-----Ursprüngliche Nachricht-----
Von: rearnsha at gcc dot gnu dot org [mailto:gcc-bugzilla@gcc.gnu.org]
Gesendet: Donnerstag, 11. September 2003 15:56
An: Hornung Peter
Betreff: [Bug optimization/12249] ARM link register is not saved during
64-bit operation
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12249
rearnsha at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |WAITING
------- Additional Comments From rearnsha at gcc dot gnu dot org 2003-09-11
13:56 -------
a recent snapshot from the 3.3 branch gives
str r4, [sp, #-4]!
.LCFI0:
.LM2:
ldr r4, .L2
.LBB2:
umull r2, ip, r4, r1
ldr r1, .L2+4
ldmia r1, {r3-r4}
mov r1, ip, lsr #3
adds r2, r4, r1
adc r1, r3, #0
.LM3:
@ lr needed for prologue
.LM4:
ldmfd sp!, {r4}
b _ZN9CEventBug4waitEy
So I think this is fixed. Please can you try the 3.3.1 release.
R.
------- You are receiving this mail because: -------
You reported the bug, or are watching the reporter.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug optimization/12249] ARM link register is not saved during 64-bit operation
2003-09-11 14:54 [Bug optimization/12249] New: ARM link register is not saved during 64-bit operation Peter_Hornung at siemens dot com
` (4 preceding siblings ...)
2003-09-12 10:58 ` Peter_Hornung at siemens dot com
@ 2003-09-12 11:04 ` rearnsha at gcc dot gnu dot org
2003-12-09 18:24 ` dhazeghi at yahoo dot com
6 siblings, 0 replies; 8+ messages in thread
From: rearnsha at gcc dot gnu dot org @ 2003-09-12 11:04 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12249
rearnsha at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |RESOLVED
Resolution| |FIXED
------- Additional Comments From rearnsha at gcc dot gnu dot org 2003-09-12 11:04 -------
fixed in 3.3.1
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug optimization/12249] ARM link register is not saved during 64-bit operation
2003-09-11 14:54 [Bug optimization/12249] New: ARM link register is not saved during 64-bit operation Peter_Hornung at siemens dot com
` (5 preceding siblings ...)
2003-09-12 11:04 ` rearnsha at gcc dot gnu dot org
@ 2003-12-09 18:24 ` dhazeghi at yahoo dot com
6 siblings, 0 replies; 8+ messages in thread
From: dhazeghi at yahoo dot com @ 2003-12-09 18:24 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |3.3.1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12249
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2003-12-09 18:24 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-09-11 14:54 [Bug optimization/12249] New: ARM link register is not saved during 64-bit operation Peter_Hornung at siemens dot com
2003-09-11 14:54 ` [Bug optimization/12249] " Peter_Hornung at siemens dot com
2003-09-11 14:54 ` rearnsha at gcc dot gnu dot org
2003-09-11 14:54 ` Peter_Hornung at siemens dot com
2003-09-12 10:57 ` Peter_Hornung at siemens dot com
2003-09-12 10:58 ` Peter_Hornung at siemens dot com
2003-09-12 11:04 ` rearnsha at gcc dot gnu dot org
2003-12-09 18:24 ` dhazeghi at yahoo 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).