2 * Attempt at using the goto label construct of GNU GCC:
3 * it turns out this does give some benefit: 5-15% speedup.
4 * Don't look at these macros, it hurts...
10 #define SWITCH(a) goto *goto_map [(a)];
11 #define BREAK SWITCH(*ip)
12 #define CASE(l) l ## _LABEL:
25 CEE_LDVIRTFTN_LABEL: \
35 CEE_ENDFILTER_LABEL: \
36 CEE_UNALIGNED__LABEL: \
37 CEE_VOLATILE__LABEL: \
47 CEE_REFANYTYPE_LABEL: \
53 #define GOTO_LABEL_VARS \
54 const static void * const goto_map [] = {\
55 #define OPDEF(a,b,c,d,e,f,g,h,i,j) \ \
57 #include "mono/cil/opcode.def" \
65 #define SWITCH(a) switch(a)
67 #define CASE(l) case l:
70 g_error ("Unimplemented opcode: %x at 0x%x\n", *ip, ip-header->code);
71 #define SUB_SWITCH case 0xFE:
72 #define GOTO_LABEL_VARS