Changeset 3034 for src/ASM


Ignore:
Timestamp:
Mar 29, 2013, 2:39:40 PM (7 years ago)
Author:
sacerdot
Message:

Bug fixed: COST instructions are now assembled as NOP to prevent the following
situation:

COST k

l: ...

...
JMP l

where the jump used to emit the label. The patch is a bit rough: we could avoid
the COST if nobody is jumping/calling the instruction just after it. But we
do not know how to decide it. Thus we should associate label emission to pairs
of PC (from-to). This patch is simpler, but it leaves a few NOPs in the
generated code.

Location:
src/ASM
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/ASM/Assembly.ma

    r2999 r3034  
    525525  λi.
    526526  match i with
    527   [ Cost cost ⇒ [ ]
     527  [ Cost cost ⇒ [ NOP … ]
    528528  | Comment comment ⇒ [ ]
    529529  | Call call ⇒
     
    12231223      ]
    12241224    | Comment comment ⇒ 〈0, 0〉
    1225     | Cost cost ⇒ 〈0, 0〉
     1225    | Cost cost ⇒
     1226       let ticks ≝ ticks_of_instruction (NOP ?) in
     1227         〈ticks, ticks〉
    12261228    | Jnz _ _ _ ⇒ ? (*CSC: To be implemented*)
    12271229    | MovSuccessor _ _ _ ⇒ ? (*CSC: To be implemented *)
  • src/ASM/PolicyFront.ma

    r2713 r3034  
    137137  λi.
    138138  match i with
    139   [ Cost cost ⇒ [ ]
     139  [ Cost cost ⇒ [ NOP … ]
    140140  | Comment comment ⇒ [ ]
    141141  | Call call ⇒
Note: See TracChangeset for help on using the changeset viewer.