[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
AW: [avr-gcc-list] Compiler error
From: |
Haase Bjoern (PT-BEU/EMT) * |
Subject: |
AW: [avr-gcc-list] Compiler error |
Date: |
Mon, 23 May 2005 16:31:29 +0200 |
I was able to reproduce your problem.
I assume that the underlying problem is, that gcc does assign the mode BLKmode
to your 3-Byte objects. It crashes since it does not know how to place an
object of mode BLKmode into registers: Blockmode is meant to be used for memory
blocks but also assigned to structs/unions of sizes that do not exactly fit
into int, long int or long long int variables.
Your asm code is forcing a BLKmode object into registers by using the "r"
constraint and there's the problem: GCC does not know how to place blocks of
memory into registers.
E.g. have a look how your object would be returned or passed as a function
parameter: GCC would probably never pass or return your union in registers but
allways in memory.
It's also not a problem of the avr port alone. The x86 port crashes as well
with your source code.
Short term (but shurly not most efficient) workaround would be to allocate 4
bytes for your union. In this case gcc will allocate a variable of mode SImode
and for this type of object, gcc knows how to place SImode objects into
registers. Other workaround would be to leave your object in memory.
HTH,
Björn
-----Ursprüngliche Nachricht-----
Von: address@hidden [mailto:address@hidden Im Auftrag von Larry Barello
Gesendet: Montag, 23. Mai 2005 16:04
An: Joerg Wunsch; address@hidden
Betreff: RE: [avr-gcc-list] Compiler error
Nope, my problem seems much worse and is in the "asm" constraints handling.
Attached is all details.
-----Original Message-----
From: Joerg Wunsch ...
What's the actual error message? (And which compiler version?)
Maybe it's related to
https://savannah.nongnu.org/bugs/?func=detailitem&item_id=13106
http://lists.gnu.org/archive/html/avr-libc-dev/2005-05/msg00020.html
- AW: [avr-gcc-list] Compiler error,
Haase Bjoern (PT-BEU/EMT) * <=