comparison python/target/arminstructions.py @ 300:158068af716c

yafm
author Windel Bouwman
date Tue, 03 Dec 2013 18:00:22 +0100
parents 534b94b40aa8
children 0615b5308710
comparison
equal deleted inserted replaced
299:674789d9ff37 300:158068af716c
416 416
417 def __repr__(self): 417 def __repr__(self):
418 return '{} {}, {}, {}'.format(self.mnemonic, self.rd, self.rn, self.imm3.imm) 418 return '{} {}, {}, {}'.format(self.mnemonic, self.rd, self.rn, self.imm3.imm)
419 419
420 @instruction 420 @instruction
421 class addregregimm3_ins(regregimm3_base): 421 class Add2(regregimm3_base):
422 """ add Rd, Rn, imm3 """ 422 """ add Rd, Rn, imm3 """
423 mnemonic = 'add' 423 mnemonic = 'add'
424 opcode = 0b0001110 424 opcode = 0b0001110
425 425
426 426
427 @instruction 427 @instruction
428 class subregregimm3_ins(regregimm3_base): 428 class Sub2(regregimm3_base):
429 """ sub Rd, Rn, imm3 """ 429 """ sub Rd, Rn, imm3 """
430 mnemonic = 'sub' 430 mnemonic = 'sub'
431 opcode = 0b0001111 431 opcode = 0b0001111
432 432
433 433
489 def __repr__(self): 489 def __repr__(self):
490 return '{} {}, {}'.format(self.mnemonic, self.rd, self.rm) 490 return '{} {}, {}'.format(self.mnemonic, self.rd, self.rm)
491 491
492 492
493 @instruction 493 @instruction
494 class mulregreg_ins(ArmInstruction): 494 class Mul(ArmInstruction):
495 """ mul Rn, Rdm """ 495 """ mul Rn, Rdm """
496 operands = (Reg8Op, Reg8Op) 496 operands = (Reg8Op, Reg8Op)
497 mnemonic = 'MUL' 497 mnemonic = 'MUL'
498 def __init__(self, rn, rdm): 498 def __init__(self, rn, rdm):
499 self.rn = rn 499 self.rn = rn