Ignore:
Timestamp:
May 19, 2011, 4:03:04 PM (10 years ago)
Author:
ayache
Message:

32 and 16 bits operations support in D2.2/8051

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Deliverables/D2.2/8051/src/languages.ml

    r740 r818  
    5555    fun filename -> AstClight (ClightParser.process filename)
    5656
     57(*
    5758  | Cminor ->
    5859    fun filename ->
     
    6364           ~parser_fun: CminorParser.program
    6465           ~input:      filename)
     66*)
    6567
    6668  | _ ->
     
    7375    AstClight (ClightLabelling.add_cost_labels p)
    7476
     77(*
    7578  | AstCminor p ->
    7679    AstCminor (CminorLabelling.add_cost_labels p)
     80*)
    7781
    7882  | x ->
     
    146150     chain then the user must have made a mistake to ask for a
    147151     translation from [src] to [tgt]. *)
    148   let rec compose iprogs src tgt chains =
    149     if src = tgt then
    150       fun _ -> List.rev iprogs
     152  let rec compose iprogs src tgt chains ast =
     153    if src = tgt then List.rev (ast :: iprogs)
    151154    else
    152155      match chains with
     
    160163          assert (l1 = src);
    161164          let l2_to_tgt = compose iprogs l2 tgt chain in
    162           fun ast ->
    163             let iprog = src_to_l2 ast in
    164             iprog :: l2_to_tgt iprog
     165          let iprog = src_to_l2 ast in
     166          ast :: l2_to_tgt iprog
    165167  in
    166   if src = tgt then (fun ast -> [ast])
    167   else
    168     compose [] src tgt (subchain compilation_chain)
     168  compose [] src tgt (subchain compilation_chain)
     169
     170
     171(** [add_runtime ast] adds runtime functions for the operations not supported by
     172    the target processor. *)
     173let add_runtime = function
     174  | AstClight p ->
     175    AstClight (Runtime.replace_unsupported (ClightSwitch.simplify p))
     176  | x ->
     177    (* For the other languages, no runtime functios are defined. *)
     178    x
    169179
    170180
     
    202212    let (p', cost_id, cost_incr) = ClightAnnotator.instrument p costs_mapping in
    203213    (AstClight p', cost_id, cost_incr)
     214(*
    204215  | AstCminor p ->
    205216    let (p', cost_id, cost_incr) = CminorAnnotator.instrument p costs_mapping in
    206217    (AstCminor p', cost_id, cost_incr)
     218*)
    207219  | p ->
    208220    Error.warning "during instrumentation"
Note: See TracChangeset for help on using the changeset viewer.