Actions
| Post | |
| Subscribe | |
| Unsubscribe |
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[coldfire-gnu-discuss] Optimizer problem
- To: coldfire-gnu-discuss@xxxxxxxxxxxxxxxx
- Subject: [coldfire-gnu-discuss] Optimizer problem
- From: 42Bastian <list-bastian.schick@xxxxxxxxxxx>
- Date: Tue, 07 Jul 2009 17:57:33 +0200
Hi,
following code:
typedef volatile unsigned long __vu32;
void bs()
{
{
extern void irq_handler(void);
int i;
__vu32 *tbl = (__vu32 *)0xffffff00;
for(i = 0; i < 64; ++i){
*tbl++ = (__vu32)irq_handler;
}
}
}
compiles to an endless loop if -Os is given:
.type bs, @function
bs:
move.w #-256,%a0
link.w %fp,#0
.L2:
move.l #irq_handler,(%a0)+
jra .L2
.size bs, .-bs
.ident "GCC: (Sourcery G++ Lite 4.3-54) 4.3.2"
Replacing __vu32 with unsigned long gives correct code.
(BTW: Test with ARM, same effect).
Am I doing something wrong here ??
--
42Bastian
- Follow-Ups:
- Re: [coldfire-gnu-discuss] Optimizer problem
- From: 42Bastian
- Re: [coldfire-gnu-discuss] Optimizer problem
- Prev by Date: Re: [coldfire-gnu-discuss] MCF51QE128 flash protection
- Next by Date: Re: [coldfire-gnu-discuss] MCF51QE128 flash protection
- Previous by thread: Re: [coldfire-gnu-discuss] MCF51QE128 flash protection
- Next by thread: Re: [coldfire-gnu-discuss] Optimizer problem
- Index(es):