comparison cpu_dsl.py @ 2468:0ca78837e4d2

Implement ext instruction in new 68K core
author Michael Pavone <pavone@retrodev.com>
date Sat, 24 Feb 2024 22:54:36 -0800
parents 679c31768013
children ea37200967c7
comparison
equal deleted inserted replaced
2467:bf8a77a8ddc4 2468:0ca78837e4d2
710 def _sextCImpl(prog, params, rawParms): 710 def _sextCImpl(prog, params, rawParms):
711 if params[0] == 16: 711 if params[0] == 16:
712 fmt = '\n\t{dst} = {src} & 0x80 ? {src} | 0xFF00 : {src} & 0x7F;' 712 fmt = '\n\t{dst} = {src} & 0x80 ? {src} | 0xFF00 : {src} & 0x7F;'
713 else: 713 else:
714 fmt = '\n\t{dst} = {src} & 0x8000 ? {src} | 0xFFFF0000 : {src} & 0x7FFF;' 714 fmt = '\n\t{dst} = {src} & 0x8000 ? {src} | 0xFFFF0000 : {src} & 0x7FFF;'
715 prog.lastSize = params[0]
715 return fmt.format(src=params[1], dst=params[2]) 716 return fmt.format(src=params[1], dst=params[2])
716 717
717 def _getCarryCheck(prog): 718 def _getCarryCheck(prog):
718 carryFlag = None 719 carryFlag = None
719 for flag in prog.flags.flagOrder: 720 for flag in prog.flags.flagOrder: