+ case INDEX_op_mov_i64: ext = 1;
Please don't put code on the same line as a case statement.
Also fall-through cases should have an explicit /* fall through */
comment (except in the case where there is no code at all
between one case statement and the next).
Would it be acceptable to put a comment at the beginning of the function
describing ext use, to avoiding a series of /* fall through */ comments?
Like this:
/* ext will be set in the switch below, which will fall through
to the common code. It triggers the use of extended registers
where appropriate. */
and then going:
case INDEX_op_something_64:
ext = 1;
case INDEX_op_something_32:
the_actual_meat(s, ext, ...);
break;