Mercurial > repos > blastem
comparison dis.c @ 564:316facea756d
Fix PC displacement mode check in disassembler so that jmps involving a register are handled correctly
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Sat, 01 Mar 2014 17:07:33 -0800 |
parents | 140af5509ce7 |
children | f822d9216968 |
comparison
equal
deleted
inserted
replaced
563:c8fefa140c80 | 564:316facea756d |
---|---|
1 /* | 1 /* |
2 Copyright 2013 Michael Pavone | 2 Copyright 2013 Michael Pavone |
3 This file is part of BlastEm. | 3 This file is part of BlastEm. |
4 BlastEm is free software distributed under the terms of the GNU General Public License version 3 or greater. See COPYING for full license text. | 4 BlastEm is free software distributed under the terms of the GNU General Public License version 3 or greater. See COPYING for full license text. |
5 */ | 5 */ |
6 #include "68kinst.h" | 6 #include "68kinst.h" |
7 #include <stdio.h> | 7 #include <stdio.h> |
8 #include <stdlib.h> | 8 #include <stdlib.h> |
190 address = instbuf.src.params.immed; | 190 address = instbuf.src.params.immed; |
191 encoded = filebuf + address/2; | 191 encoded = filebuf + address/2; |
192 if (is_visited(address)) { | 192 if (is_visited(address)) { |
193 break; | 193 break; |
194 } | 194 } |
195 } else if (instbuf.src.addr_mode = MODE_PC_DISPLACE) { | 195 } else if (instbuf.src.addr_mode == MODE_PC_DISPLACE) { |
196 address = instbuf.src.params.regs.displacement + instbuf.address + 2; | 196 address = instbuf.src.params.regs.displacement + instbuf.address + 2; |
197 encoded = filebuf + address/2; | 197 encoded = filebuf + address/2; |
198 if (is_visited(address)) { | 198 if (is_visited(address)) { |
199 break; | 199 break; |
200 } | 200 } |