Ignore:
Timestamp:
Feb 17, 2011, 2:52:34 PM (8 years ago)
Author:
mulligan
Message:

Emulator fixed for Wilmer

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Deliverables/D4.1/ASMInterpret.ml

    r454 r557  
    941941;;
    942942
    943 let half_add_with_overflow = assert false;;
    944 
    945943let assembly p =
    946944 let datalabels,_ =
     
    959957      | `Mov (_,_) -> pc, labels, costs
    960958      | `Jmp _
    961       | `Call _ -> (snd (half_add_with_overflow pc (BitVectors.vect_of_int 3 `Sixteen))), labels, costs  (*CSC: very stupid: always expand to worst opcode *)
     959      | `Call _ -> (snd (half_add pc (BitVectors.vect_of_int 3 `Sixteen))), labels, costs  (*CSC: very stupid: always expand to worst opcode *)
    962960      | `WithLabel i ->
    963961          let fake_addr _ = `REL (zero `Eight) in
     
    965963          let i',pc',_ = fetch (load_code_memory (assembly1 fake_jump)) (vect_of_int 0 `Sixteen) in
    966964           assert (fake_jump = i');
    967            (snd (half_add_with_overflow pc pc'),labels, costs)
     965           (snd (half_add pc pc'),labels, costs)
    968966      | #instruction as i ->
    969967        let i',pc',_ = fetch (load_code_memory (assembly1 i)) (vect_of_int 0 `Sixteen) in
    970968         assert (i = i');
    971          (snd (half_add_with_overflow pc pc'),labels, costs)
     969         (snd (half_add pc pc'),labels, costs)
    972970   ) (BitVectors.zero `Sixteen,StringMap.empty,WordMap.empty) p.ASM.code
    973971 in
Note: See TracChangeset for help on using the changeset viewer.