--- Comment #5 from rguenth at gcc dot gnu dot org 2006-04-25 15:45 ---
__res should be allocated to the same register as __r0 due to the '0'
constraint which tells gcc to use the same register as for "=r" (__res).
Whoops - I obviously meant to remove the __asm__("r0") from the __r0
var
--- Comment #4 from Eric dot Doenges at betty-tv dot com 2006-04-25 14:43
---
Removing the __asm__ ("r0") from __res works around the bug - but then I cannot
depend on gcc
always allocating r0 for __res, can I ? I found no other way to tell gcc which
registers it must use.
I'm assuming
--- Comment #3 from Eric dot Doenges at betty-tv dot com 2006-04-25 14:37
---
Storing the result to memory generates correct code
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27308
--- Comment #2 from rguenth at gcc dot gnu dot org 2006-04-25 12:49 ---
This is probably a problem with the inline asm constraints. Try removing the
__asm__("r0") from the __res variable. Also try simplifying the testcase by
storing the result of BIOS_ContainerUsage(1) to memory rather
--- Comment #1 from rguenth at gcc dot gnu dot org 2006-04-25 12:38 ---
*** Bug 27305 has been marked as a duplicate of this bug. ***
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27308