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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extracted/policyFront.ml

    r2773 r3034  
    197197| ASM.Instruction instr -> expand_relative_jump_unsafe jmp_len instr
    198198| ASM.Comment comment -> List.Nil
    199 | ASM.Cost cost -> List.Nil
     199| ASM.Cost cost -> List.Cons ((ASM.RealInstruction ASM.NOP), List.Nil)
    200200| ASM.Jmp jmp ->
    201201  (match jmp_len with
Note: See TracChangeset for help on using the changeset viewer.