Changeset 2704


Ignore:
Timestamp:
Feb 22, 2013, 3:53:48 PM (6 years ago)
Author:
tranquil
Message:

moved JMP from instructions to preinstructions, and added MovSuccessor? pseudoinstruction

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ASM/ASM.ma

    r2647 r2704  
    518518| JZ: A → preinstruction A
    519519| JNZ: A → preinstruction A
     520| JMP: [[indirect_dptr]] → preinstruction A
    520521| CJNE:
    521522   [[acc_a]] × [[direct; data]] ⊎ [[registr; indirect]] × [[data]] → A → preinstruction A
     
    639640    match j with
    640641    [ JNZ arg' ⇒ eq_addressing_mode arg arg'
     642    | _ ⇒ false
     643    ]
     644  | JMP arg ⇒
     645    match j with
     646    [ JMP arg' ⇒ eq_addressing_mode arg arg'
    641647    | _ ⇒ false
    642648    ]
     
    887893  | LJMP: [[addr16]] → instruction
    888894  | SJMP: [[relative]] → instruction
    889   | JMP: [[indirect_dptr]] → instruction
    890895  | MOVC: [[acc_a]] → [[ acc_dptr ; acc_pc ]] → instruction
    891896  | RealInstruction: preinstruction [[ relative ]] → instruction.
     
    920925    match j with
    921926    [ SJMP arg' ⇒ eq_addressing_mode arg arg'
    922     | _ ⇒ false
    923     ]
    924   | JMP arg ⇒
    925     match j with
    926     [ JMP arg' ⇒ eq_addressing_mode arg arg'
    927927    | _ ⇒ false
    928928    ]
     
    971971qed.
    972972
     973inductive word_side : Type[0] ≝ HIGH : word_side | LOW : word_side.
     974
    973975inductive pseudo_instruction: Type[0] ≝
    974976  | Instruction: preinstruction Identifier → pseudo_instruction
     
    976978  | Cost: costlabel → pseudo_instruction
    977979  | Jmp: Identifier → pseudo_instruction
     980  | CondJmp : [[acc_a]] → Identifier → Identifier → pseudo_instruction
     981  | MovSuccessor : [[ registr ; indirect ]] → word_side → Identifier → pseudo_instruction
    978982  | Call: Identifier → pseudo_instruction
    979983  | Mov: [[dptr]] → Identifier → pseudo_instruction.
Note: See TracChangeset for help on using the changeset viewer.