Mercurial > repos > blastem
comparison m68k_to_x86.c @ 125:dc5fc3adf705
Fix encoding of movsx instruction when used with new (i.e. r9-r15) registers. This fixes the indexed addressing modes when used with a word-wide index register
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Sat, 29 Dec 2012 22:11:28 -0800 |
parents | da95566514f3 |
children | 4e45d75501cf |
comparison
equal
deleted
inserted
replaced
124:da95566514f3 | 125:dc5fc3adf705 |
---|---|
633 } | 633 } |
634 | 634 |
635 uint8_t * get_native_address(native_map_slot * native_code_map, uint32_t address) | 635 uint8_t * get_native_address(native_map_slot * native_code_map, uint32_t address) |
636 { | 636 { |
637 address &= 0xFFFFFF; | 637 address &= 0xFFFFFF; |
638 if (address > 0x400000) { | 638 //if (address > 0x400000) { |
639 printf("get_native_address: %X\n", address); | 639 printf("get_native_address: %X\n", address); |
640 } | 640 //} |
641 address /= 2; | 641 address /= 2; |
642 uint32_t chunk = address / NATIVE_CHUNK_SIZE; | 642 uint32_t chunk = address / NATIVE_CHUNK_SIZE; |
643 if (!native_code_map[chunk].base) { | 643 if (!native_code_map[chunk].base) { |
644 return NULL; | 644 return NULL; |
645 } | 645 } |