This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [RFC] asm goto
It *does* support arbitrary numbers of edges. You can put
any number of labels in that section.
I'm curious however: from reading the patch, I didn't find anything
adding a default fallthrough edge. Does it do that?
> and it needs a means to specify the exit block/exceptions.
Hmm?
What if I want to say that the asm might throw an exception? That
requires an edge to the exit block.
You can add a label and throw there, like:
#define JO _JO(__COUNTER__)
#define_JO(N) \
{ \
register char *foo asm("%rax"); \
if (1) \
asm goto ("mov %0, %%rax; jo %l0" : : "a" ("overflow") : : \
throw##N); \
else throw##N: throw overflow_exception(foo); \
}
Paolo