On Fri, 17 Sep 2010 12:08:38 +0100 Dave Hooper <d...@beermex.com> wrote:
> If I remember correctly, gcc was not clever enough to maintain the > ordering constraints needed by the ldmia/stmia calls, so I needed to > assign the registers manually to prevent generating bad code Ah right, GCC can not be aware of such a constraint, it doesn't see the ldmia inside the asm() > (by the > way x86 shouldn't use this file at all so compilation issues wouldn't > show up on your build). Yeah I just tried x86 because there were some changes in Tremor SVN (os_types.h was renamed -> misc.h) > I had thought that register("r10") would > ensure the code-generation step preserves existing value of r10 - is > that not the case? If not then it sounds like we need to stack all > registers at entry/unstack on exist from all functions that use the > TRANSFORM macros. I'd kinda assumed that gcc would just do this by > default though. If not, maybe there's another syntax or idiom that > lets us specify an explicit register AND have gcc ensure its original > value is preserved on function prolog/epilog. Hm i just tried on a small file and r10 should be preserved on prolog/epilog so maybe something's going wrong? I think the OP should post .S output of gcc and also give us compiler version and options being used -- Rafaël Carré