On 08-03-2012 14:48, Daniel Murphy wrote:
"Denis Shelomovskij"<verylonglogin....@gmail.com> wrote in message
news:jj9uv1$8o$1...@digitalmars.com...
1. Is there any guaranties that no code will be added between sequential
inline assembler blocks, e.g.:
---
void f()
{
static if(x)
asm { mov EBX, 3; }
else
asm { mov EBX, 7; }
asm { mov EAX, EBX; } // Is EBX value defined here?
}
---
Is it documented?
I'm pretty sure dmd splits up all asm block into bunches of asm statements
internally, so you should be able to rely on this. (dmd only) I don't think
it's documented anywhere.
I don't think it should be a formal language requirement either. It
would be a rather harsh limitation on inline assembly implementations.
--
- Alex