comparison lwasm/instab.c @ 115:344cfc25afec

Added initial infrastructure for pragma autobranchlength (suggested by Ebonhand on irc)
author lost@l-w.ca
date Mon, 08 Aug 2011 23:00:27 -0600
parents 38c1537857ce
children 7b0716264251
comparison
equal deleted inserted replaced
114:707eda49ad60 115:344cfc25afec
336 { "asra", { 0x47, -1, -1, -1 }, insn_parse_inh, insn_resolve_inh, insn_emit_inh, lwasm_insn_normal}, 336 { "asra", { 0x47, -1, -1, -1 }, insn_parse_inh, insn_resolve_inh, insn_emit_inh, lwasm_insn_normal},
337 { "asrb", { 0x57, -1, -1, -1 }, insn_parse_inh, insn_resolve_inh, insn_emit_inh, lwasm_insn_normal}, 337 { "asrb", { 0x57, -1, -1, -1 }, insn_parse_inh, insn_resolve_inh, insn_emit_inh, lwasm_insn_normal},
338 { "asrd", { 0x1047, -1, -1, -1 }, insn_parse_inh, insn_resolve_inh, insn_emit_inh, lwasm_insn_is6309}, 338 { "asrd", { 0x1047, -1, -1, -1 }, insn_parse_inh, insn_resolve_inh, insn_emit_inh, lwasm_insn_is6309},
339 339
340 { "band", { 0x1130, -1, -1, -1 }, insn_parse_bitbit, insn_resolve_bitbit, insn_emit_bitbit, lwasm_insn_is6309}, 340 { "band", { 0x1130, -1, -1, -1 }, insn_parse_bitbit, insn_resolve_bitbit, insn_emit_bitbit, lwasm_insn_is6309},
341 { "bcc", { 0x24, -1, -1, -1 }, insn_parse_rel8, insn_resolve_rel8, insn_emit_rel8, lwasm_insn_normal}, 341 { "bcc", { 0x24, -1, 0x24, 0x1024},insn_parse_rel8, insn_resolve_rel8, insn_emit_rel8, lwasm_insn_normal},
342 { "bcs", { 0x25, -1, -1, -1 }, insn_parse_rel8, insn_resolve_rel8, insn_emit_rel8, lwasm_insn_normal}, 342 { "bcs", { 0x25, -1, 0x25, 0x1025},insn_parse_rel8, insn_resolve_rel8, insn_emit_rel8, lwasm_insn_normal},
343 { "beor", { 0x1134, -1, -1, -1 }, insn_parse_bitbit, insn_resolve_bitbit, insn_emit_bitbit, lwasm_insn_is6309}, 343 { "beor", { 0x1134, -1, -1, -1 }, insn_parse_bitbit, insn_resolve_bitbit, insn_emit_bitbit, lwasm_insn_is6309},
344 { "beq", { 0x27, -1, -1, -1 }, insn_parse_rel8, insn_resolve_rel8, insn_emit_rel8, lwasm_insn_normal}, 344 { "beq", { 0x27, -1, 0x27, 0x1027},insn_parse_rel8, insn_resolve_rel8, insn_emit_rel8, lwasm_insn_normal},
345 { "bge", { 0x2c, -1, -1, -1 }, insn_parse_rel8, insn_resolve_rel8, insn_emit_rel8, lwasm_insn_normal}, 345 { "bge", { 0x2c, -1, 0x2c, 0x102c},insn_parse_rel8, insn_resolve_rel8, insn_emit_rel8, lwasm_insn_normal},
346 { "bgt", { 0x2e, -1, -1, -1 }, insn_parse_rel8, insn_resolve_rel8, insn_emit_rel8, lwasm_insn_normal}, 346 { "bgt", { 0x2e, -1, 0x2e, 0x102e},insn_parse_rel8, insn_resolve_rel8, insn_emit_rel8, lwasm_insn_normal},
347 { "bhi", { 0x22, -1, -1, -1 }, insn_parse_rel8, insn_resolve_rel8, insn_emit_rel8, lwasm_insn_normal}, 347 { "bhi", { 0x22, -1, 0x22, 0x1022},insn_parse_rel8, insn_resolve_rel8, insn_emit_rel8, lwasm_insn_normal},
348 { "bhs", { 0x24, -1, -1, -1 }, insn_parse_rel8, insn_resolve_rel8, insn_emit_rel8, lwasm_insn_normal}, 348 { "bhs", { 0x24, -1, 0x24, 0x1024},insn_parse_rel8, insn_resolve_rel8, insn_emit_rel8, lwasm_insn_normal},
349 { "biand", { 0x1131, -1, -1, -1 }, insn_parse_bitbit, insn_resolve_bitbit, insn_emit_bitbit, lwasm_insn_is6309}, 349 { "biand", { 0x1131, -1, -1, -1 }, insn_parse_bitbit, insn_resolve_bitbit, insn_emit_bitbit, lwasm_insn_is6309},
350 { "bieor", { 0x1135, -1, -1, -1 }, insn_parse_bitbit, insn_resolve_bitbit, insn_emit_bitbit, lwasm_insn_is6309}, 350 { "bieor", { 0x1135, -1, -1, -1 }, insn_parse_bitbit, insn_resolve_bitbit, insn_emit_bitbit, lwasm_insn_is6309},
351 { "bior", { 0x1133, -1, -1, -1 }, insn_parse_bitbit, insn_resolve_bitbit, insn_emit_bitbit, lwasm_insn_is6309}, 351 { "bior", { 0x1133, -1, -1, -1 }, insn_parse_bitbit, insn_resolve_bitbit, insn_emit_bitbit, lwasm_insn_is6309},
352 { "bita", { 0x95, 0xa5, 0xb5, 0x85}, insn_parse_gen8, insn_resolve_gen8, insn_emit_gen8, lwasm_insn_normal}, 352 { "bita", { 0x95, 0xa5, 0xb5, 0x85}, insn_parse_gen8, insn_resolve_gen8, insn_emit_gen8, lwasm_insn_normal},
353 { "bitb", { 0xd5, 0xe5, 0xf5, 0xc5}, insn_parse_gen8, insn_resolve_gen8, insn_emit_gen8, lwasm_insn_normal}, 353 { "bitb", { 0xd5, 0xe5, 0xf5, 0xc5}, insn_parse_gen8, insn_resolve_gen8, insn_emit_gen8, lwasm_insn_normal},
354 { "bitd", { 0x1095, 0x10a5, 0x10b5, 0x1085},insn_parse_gen16, insn_resolve_gen16, insn_emit_gen16, lwasm_insn_is6309}, 354 { "bitd", { 0x1095, 0x10a5, 0x10b5, 0x1085},insn_parse_gen16, insn_resolve_gen16, insn_emit_gen16, lwasm_insn_is6309},
355 { "bitmd", { 0x113c, -1, -1, 0x113c},insn_parse_imm8, insn_resolve_imm8, insn_emit_imm8, lwasm_insn_is6309}, 355 { "bitmd", { 0x113c, -1, -1, 0x113c},insn_parse_imm8, insn_resolve_imm8, insn_emit_imm8, lwasm_insn_is6309},
356 { "ble", { 0x2f, -1, -1, -1 }, insn_parse_rel8, insn_resolve_rel8, insn_emit_rel8, lwasm_insn_normal}, 356 { "ble", { 0x2f, -1, 0x2f, 0x102f},insn_parse_rel8, insn_resolve_rel8, insn_emit_rel8, lwasm_insn_normal},
357 { "blo", { 0x25, -1, -1, -1 }, insn_parse_rel8, insn_resolve_rel8, insn_emit_rel8, lwasm_insn_normal}, 357 { "blo", { 0x25, -1, 0x25, 0x1025},insn_parse_rel8, insn_resolve_rel8, insn_emit_rel8, lwasm_insn_normal},
358 { "bls", { 0x23, -1, -1, -1 }, insn_parse_rel8, insn_resolve_rel8, insn_emit_rel8, lwasm_insn_normal}, 358 { "bls", { 0x23, -1, 0x23, 0x1023},insn_parse_rel8, insn_resolve_rel8, insn_emit_rel8, lwasm_insn_normal},
359 { "blt", { 0x2d, -1, -1, -1 }, insn_parse_rel8, insn_resolve_rel8, insn_emit_rel8, lwasm_insn_normal}, 359 { "blt", { 0x2d, -1, 0x2d, 0x102d},insn_parse_rel8, insn_resolve_rel8, insn_emit_rel8, lwasm_insn_normal},
360 { "bmi", { 0x2b, -1, -1, -1 }, insn_parse_rel8, insn_resolve_rel8, insn_emit_rel8, lwasm_insn_normal}, 360 { "bmi", { 0x2b, -1, 0x2b, 0x102b},insn_parse_rel8, insn_resolve_rel8, insn_emit_rel8, lwasm_insn_normal},
361 { "bne", { 0x26, -1, -1, -1 }, insn_parse_rel8, insn_resolve_rel8, insn_emit_rel8, lwasm_insn_normal}, 361 { "bne", { 0x26, -1, 0x26, 0x1026},insn_parse_rel8, insn_resolve_rel8, insn_emit_rel8, lwasm_insn_normal},
362 { "bor", { 0x1132, -1, -1, -1 }, insn_parse_bitbit, insn_resolve_bitbit, insn_emit_bitbit, lwasm_insn_is6309}, 362 { "bor", { 0x1132, -1, -1, -1 }, insn_parse_bitbit, insn_resolve_bitbit, insn_emit_bitbit, lwasm_insn_is6309},
363 { "bpl", { 0x2a, -1, -1, -1 }, insn_parse_rel8, insn_resolve_rel8, insn_emit_rel8, lwasm_insn_normal}, 363 { "bpl", { 0x2a, -1, 0x2a, 0x102a},insn_parse_rel8, insn_resolve_rel8, insn_emit_rel8, lwasm_insn_normal},
364 { "bra", { 0x20, -1, -1, -1 }, insn_parse_rel8, insn_resolve_rel8, insn_emit_rel8, lwasm_insn_normal}, 364 { "bra", { 0x20, -1, 0x20, 0x16}, insn_parse_rel8, insn_resolve_rel8, insn_emit_rel8, lwasm_insn_normal},
365 { "brn", { 0x21, -1, -1, -1 }, insn_parse_rel8, insn_resolve_rel8, insn_emit_rel8, lwasm_insn_normal}, 365 { "brn", { 0x21, -1, 0x21, 0x1021},insn_parse_rel8, insn_resolve_rel8, insn_emit_rel8, lwasm_insn_normal},
366 { "bsr", { 0x8d, -1, -1, -1 }, insn_parse_rel8, insn_resolve_rel8, insn_emit_rel8, lwasm_insn_normal}, 366 { "bsr", { 0x8d, -1, 0x8d, 0x17}, insn_parse_rel8, insn_resolve_rel8, insn_emit_rel8, lwasm_insn_normal},
367 { "bvc", { 0x28, -1, -1, -1 }, insn_parse_rel8, insn_resolve_rel8, insn_emit_rel8, lwasm_insn_normal}, 367 { "bvc", { 0x28, -1, 0x28, 0x1028},insn_parse_rel8, insn_resolve_rel8, insn_emit_rel8, lwasm_insn_normal},
368 { "bvs", { 0x29, -1, -1, -1 }, insn_parse_rel8, insn_resolve_rel8, insn_emit_rel8, lwasm_insn_normal}, 368 { "bvs", { 0x29, -1, 0x29, 0x1029}, insn_parse_rel8, insn_resolve_rel8, insn_emit_rel8, lwasm_insn_normal},
369 369
370 { "clr", { 0x0f, 0x6f, 0x7f, -1 }, insn_parse_gen0, insn_resolve_gen0, insn_emit_gen0, lwasm_insn_normal}, 370 { "clr", { 0x0f, 0x6f, 0x7f, -1 }, insn_parse_gen0, insn_resolve_gen0, insn_emit_gen0, lwasm_insn_normal},
371 { "clra", { 0x4f, -1, -1, -1 }, insn_parse_inh, insn_resolve_inh, insn_emit_inh, lwasm_insn_normal}, 371 { "clra", { 0x4f, -1, -1, -1 }, insn_parse_inh, insn_resolve_inh, insn_emit_inh, lwasm_insn_normal},
372 { "clrb", { 0x5f, -1, -1, -1 }, insn_parse_inh, insn_resolve_inh, insn_emit_inh, lwasm_insn_normal}, 372 { "clrb", { 0x5f, -1, -1, -1 }, insn_parse_inh, insn_resolve_inh, insn_emit_inh, lwasm_insn_normal},
373 { "clrd", { 0x104f, -1, -1, -1 }, insn_parse_inh, insn_resolve_inh, insn_emit_inh, lwasm_insn_is6309}, 373 { "clrd", { 0x104f, -1, -1, -1 }, insn_parse_inh, insn_resolve_inh, insn_emit_inh, lwasm_insn_is6309},
421 { "incw", { 0x105c, -1, -1, -1 }, insn_parse_inh, insn_resolve_inh, insn_emit_inh, lwasm_insn_is6309}, 421 { "incw", { 0x105c, -1, -1, -1 }, insn_parse_inh, insn_resolve_inh, insn_emit_inh, lwasm_insn_is6309},
422 422
423 { "jmp", { 0x0e, 0x6e, 0x7e, -1 }, insn_parse_gen0, insn_resolve_gen0, insn_emit_gen0, lwasm_insn_normal}, 423 { "jmp", { 0x0e, 0x6e, 0x7e, -1 }, insn_parse_gen0, insn_resolve_gen0, insn_emit_gen0, lwasm_insn_normal},
424 { "jsr", { 0x9d, 0xad, 0xbd, -1 }, insn_parse_gen0, insn_resolve_gen0, insn_emit_gen0, lwasm_insn_normal}, 424 { "jsr", { 0x9d, 0xad, 0xbd, -1 }, insn_parse_gen0, insn_resolve_gen0, insn_emit_gen0, lwasm_insn_normal},
425 425
426 { "lbcc", { 0x1024, -1, -1, -1 }, insn_parse_rel16, insn_resolve_rel16, insn_emit_rel16, lwasm_insn_normal}, 426 { "lbcc", { 0x1024, -1, 0x24, 0x1024},insn_parse_rel16, insn_resolve_rel16, insn_emit_rel16, lwasm_insn_normal},
427 { "lbcs", { 0x1025, -1, -1, -1 }, insn_parse_rel16, insn_resolve_rel16, insn_emit_rel16, lwasm_insn_normal}, 427 { "lbcs", { 0x1025, -1, 0x25, 0x1025},insn_parse_rel16, insn_resolve_rel16, insn_emit_rel16, lwasm_insn_normal},
428 { "lbeq", { 0x1027, -1, -1, -1 }, insn_parse_rel16, insn_resolve_rel16, insn_emit_rel16, lwasm_insn_normal}, 428 { "lbeq", { 0x1027, -1, 0x27, 0x1027},insn_parse_rel16, insn_resolve_rel16, insn_emit_rel16, lwasm_insn_normal},
429 { "lbge", { 0x102c, -1, -1, -1 }, insn_parse_rel16, insn_resolve_rel16, insn_emit_rel16, lwasm_insn_normal}, 429 { "lbge", { 0x102c, -1, 0x2c, 0x102c},insn_parse_rel16, insn_resolve_rel16, insn_emit_rel16, lwasm_insn_normal},
430 { "lbgt", { 0x102e, -1, -1, -1 }, insn_parse_rel16, insn_resolve_rel16, insn_emit_rel16, lwasm_insn_normal}, 430 { "lbgt", { 0x102e, -1, 0x2e, 0x102e},insn_parse_rel16, insn_resolve_rel16, insn_emit_rel16, lwasm_insn_normal},
431 { "lbhi", { 0x1022, -1, -1, -1 }, insn_parse_rel16, insn_resolve_rel16, insn_emit_rel16, lwasm_insn_normal}, 431 { "lbhi", { 0x1022, -1, 0x22, 0x1022},insn_parse_rel16, insn_resolve_rel16, insn_emit_rel16, lwasm_insn_normal},
432 { "lbhs", { 0x1024, -1, -1, -1 }, insn_parse_rel16, insn_resolve_rel16, insn_emit_rel16, lwasm_insn_normal}, 432 { "lbhs", { 0x1024, -1, 0x24, 0x1024},insn_parse_rel16, insn_resolve_rel16, insn_emit_rel16, lwasm_insn_normal},
433 { "lble", { 0x102f, -1, -1, -1 }, insn_parse_rel16, insn_resolve_rel16, insn_emit_rel16, lwasm_insn_normal}, 433 { "lble", { 0x102f, -1, 0x2f, 0x102f},insn_parse_rel16, insn_resolve_rel16, insn_emit_rel16, lwasm_insn_normal},
434 { "lblo", { 0x1025, -1, -1, -1 }, insn_parse_rel16, insn_resolve_rel16, insn_emit_rel16, lwasm_insn_normal}, 434 { "lblo", { 0x1025, -1, 0x25, 0x1025},insn_parse_rel16, insn_resolve_rel16, insn_emit_rel16, lwasm_insn_normal},
435 { "lbls", { 0x1023, -1, -1, -1 }, insn_parse_rel16, insn_resolve_rel16, insn_emit_rel16, lwasm_insn_normal}, 435 { "lbls", { 0x1023, -1, 0x23, 0x1023},insn_parse_rel16, insn_resolve_rel16, insn_emit_rel16, lwasm_insn_normal},
436 { "lblt", { 0x102d, -1, -1, -1 }, insn_parse_rel16, insn_resolve_rel16, insn_emit_rel16, lwasm_insn_normal}, 436 { "lblt", { 0x102d, -1, 0x2d, 0x102d},insn_parse_rel16, insn_resolve_rel16, insn_emit_rel16, lwasm_insn_normal},
437 { "lbmi", { 0x102b, -1, -1, -1 }, insn_parse_rel16, insn_resolve_rel16, insn_emit_rel16, lwasm_insn_normal}, 437 { "lbmi", { 0x102b, -1, 0x2b, 0x102b},insn_parse_rel16, insn_resolve_rel16, insn_emit_rel16, lwasm_insn_normal},
438 { "lbne", { 0x1026, -1, -1, -1 }, insn_parse_rel16, insn_resolve_rel16, insn_emit_rel16, lwasm_insn_normal}, 438 { "lbne", { 0x1026, -1, 0x26, 0x1026},insn_parse_rel16, insn_resolve_rel16, insn_emit_rel16, lwasm_insn_normal},
439 { "lbpl", { 0x102a, -1, -1, -1 }, insn_parse_rel16, insn_resolve_rel16, insn_emit_rel16, lwasm_insn_normal}, 439 { "lbpl", { 0x102a, -1, 0x2a, 0x102a},insn_parse_rel16, insn_resolve_rel16, insn_emit_rel16, lwasm_insn_normal},
440 { "lbra", { 0x16, -1, -1, -1 }, insn_parse_rel16, insn_resolve_rel16, insn_emit_rel16, lwasm_insn_normal}, 440 { "lbra", { 0x16, -1, 0x20, 0x16}, insn_parse_rel16, insn_resolve_rel16, insn_emit_rel16, lwasm_insn_normal},
441 { "lbrn", { 0x1021, -1, -1, -1 }, insn_parse_rel16, insn_resolve_rel16, insn_emit_rel16, lwasm_insn_normal}, 441 { "lbrn", { 0x1021, -1, 0x21, 0x1021},insn_parse_rel16, insn_resolve_rel16, insn_emit_rel16, lwasm_insn_normal},
442 { "lbsr", { 0x17, -1, -1, -1 }, insn_parse_rel16, insn_resolve_rel16, insn_emit_rel16, lwasm_insn_normal}, 442 { "lbsr", { 0x17, -1, 0x8d, 0x17}, insn_parse_rel16, insn_resolve_rel16, insn_emit_rel16, lwasm_insn_normal},
443 { "lbvc", { 0x1028, -1, -1, -1 }, insn_parse_rel16, insn_resolve_rel16, insn_emit_rel16, lwasm_insn_normal}, 443 { "lbvc", { 0x1028, -1, 0x28, 0x1028},insn_parse_rel16, insn_resolve_rel16, insn_emit_rel16, lwasm_insn_normal},
444 { "lbvs", { 0x1029, -1, -1, -1 }, insn_parse_rel16, insn_resolve_rel16, insn_emit_rel16, lwasm_insn_normal}, 444 { "lbvs", { 0x1029, -1, 0x29, 0x1029},insn_parse_rel16, insn_resolve_rel16, insn_emit_rel16, lwasm_insn_normal},
445 { "lda", { 0x96, 0xa6, 0xb6, 0x86}, insn_parse_gen8, insn_resolve_gen8, insn_emit_gen8, lwasm_insn_normal}, 445 { "lda", { 0x96, 0xa6, 0xb6, 0x86}, insn_parse_gen8, insn_resolve_gen8, insn_emit_gen8, lwasm_insn_normal},
446 { "ldb", { 0xd6, 0xe6, 0xf6, 0xc6}, insn_parse_gen8, insn_resolve_gen8, insn_emit_gen8, lwasm_insn_normal}, 446 { "ldb", { 0xd6, 0xe6, 0xf6, 0xc6}, insn_parse_gen8, insn_resolve_gen8, insn_emit_gen8, lwasm_insn_normal},
447 { "ldbt", { 0x1136, -1, -1, -1 }, insn_parse_bitbit, insn_resolve_bitbit, insn_emit_bitbit, lwasm_insn_is6309}, 447 { "ldbt", { 0x1136, -1, -1, -1 }, insn_parse_bitbit, insn_resolve_bitbit, insn_emit_bitbit, lwasm_insn_is6309},
448 { "ldd", { 0xdc, 0xec, 0xfc, 0xcc}, insn_parse_gen16, insn_resolve_gen16, insn_emit_gen16, lwasm_insn_normal}, 448 { "ldd", { 0xdc, 0xec, 0xfc, 0xcc}, insn_parse_gen16, insn_resolve_gen16, insn_emit_gen16, lwasm_insn_normal},
449 { "lde", { 0x1196, 0x11a6, 0x11b6, 0x1186},insn_parse_gen8, insn_resolve_gen8, insn_emit_gen8, lwasm_insn_is6309}, 449 { "lde", { 0x1196, 0x11a6, 0x11b6, 0x1186},insn_parse_gen8, insn_resolve_gen8, insn_emit_gen8, lwasm_insn_is6309},