| LEFT | RIGHT |
| 1 <%! | 1 <%! |
| 2 import instructions | 2 import instructions |
| 3 %>\ | 3 %>\ |
| 4 | 4 |
| 5 static void *opcode_targets[ ${ len(instr_set.set) } ]= { | 5 static void *opcode_targets[ ${ len(instr_set.set) } ]= { |
| 6 % for opcode, instr_obj in enumerate(instr_set): | 6 % for opcode, instr_obj in enumerate(instr_set): |
| 7 % if type(instr_obj) == instructions.UnknownInstr or instr_obj.id == 'NOP
': | 7 % if type(instr_obj) == instructions.UnknownInstr or instr_obj.id == 'NOP
': |
| 8 &&${ "_unknown_opcode".ljust(instr_set.max_ident_len + 15 + 7) }, // ${op
code} | 8 &&${ "_unknown_opcode".ljust(instr_set.max_ident_len + 15 + 7) }, // ${op
code} |
| 9 % else: | 9 % else: |
| 10 &&TARGET_${instr_obj.id.ljust( instr_set.max_ident_len + 15)}, // ${opcod
e} | 10 &&TARGET_${instr_obj.id.ljust( instr_set.max_ident_len + 15)}, // ${opcod
e} |
| 11 % endif | 11 % endif |
| 12 % endfor | 12 % endfor |
| 13 }; | 13 }; |
| 14 | 14 |
| 15 | 15 |
| 16 static void *opcode_no_dispatch_targets[ ${ len(instr_set.set) } ]= { | 16 static void *opcode_no_dispatch_targets[ ${ len(instr_set.set) } ]= { |
| 17 % for opcode, instr_obj in enumerate(instr_set): | 17 % for opcode, instr_obj in enumerate(instr_set): |
| 18 % if type(instr_obj) == instructions.UnknownInstr or instr_obj.id == 'NOP
': | 18 % if type(instr_obj) == instructions.UnknownInstr or instr_obj.id == 'NOP
': |
| 19 &&${ "_unknown_opcode".ljust(instr_set.max_ident_len + 15 + 7) }, // ${op
code} | 19 &&${ "_unknown_opcode".ljust(instr_set.max_ident_len + 15 + 7) }, // ${op
code} |
| 20 % else: | 20 % else: |
| 21 &&TARGET_${ instr_obj.id.ljust( instr_set.max_ident_len + 15).strip() }_S
KIP_DISPATCH, // ${opcode} | 21 &&TARGET_${ instr_obj.id.ljust( instr_set.max_ident_len + 15).strip() }_S
KIP_DISPATCH, // ${opcode} |
| 22 % endif | 22 % endif |
| 23 % endfor | 23 % endfor |
| 24 }; | 24 }; |
| LEFT | RIGHT |