Ignore:
Timestamp:
Jul 18, 2012, 1:26:43 PM (8 years ago)
Author:
tranquil
Message:
  • moving some code around
  • changed immediates to hold beval in general, not only bytes
  • fixed RTLabsToRTL after redefinitions in front end
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ERTL/ERTL_paolo.ma

    r2174 r2208  
    66  | HDW: Register → move_dst.
    77
    8 inductive move_src: Type[0] ≝
    9   | INT: Byte → move_src
    10   | REG: move_dst → move_src.
     8definition move_src ≝ argument move_dst.
    119
    12 coercion move_dst_to_src : ∀r : move_dst.move_src ≝ REG on _r : move_dst to move_src.
     10definition move_src_from_dst : move_dst → move_src ≝ Reg move_dst.
     11coercion move_dst_to_src : ∀r : move_dst.move_src ≝ move_src_from_dst on _r : move_dst to move_src.
    1312
    14 definition rtl_argument_move_src : rtl_argument → move_src ≝
     13definition psd_argument_move_src : psd_argument → move_src ≝
    1514  λarg.match arg with
    16   [ Imm b ⇒ INT b
    17   | Reg r ⇒ REG (PSD r)
     15  [ Imm b ⇒ Imm ? b
     16  | Reg r ⇒ Reg ? (PSD r)
    1817  ].
    19 
    20 coercion rtl_argument_to_move_src : ∀a:rtl_argument.move_src ≝
    21   rtl_argument_move_src on _a : rtl_argument to move_src.
     18coercion psd_argument_to_move_src : ∀a:psd_argument.move_src ≝
     19  psd_argument_move_src on _a : psd_argument to move_src.
    2220
    2321inductive ertl_seq : Type[0] ≝
     
    3028    (* acc_a_reg ≝ *) register
    3129    (* acc_b_reg ≝ *) register
    32     (* acc_a_arg ≝ *) rtl_argument
    33     (* acc_b_arg ≝ *) rtl_argument
     30    (* acc_a_arg ≝ *) psd_argument
     31    (* acc_b_arg ≝ *) psd_argument
    3432    (* dpl_reg   ≝ *) register
    3533    (* dph_reg   ≝ *) register
    36     (* dpl_arg   ≝ *) rtl_argument
    37     (* dph_arg   ≝ *) rtl_argument
    38     (* snd_arg   ≝ *) rtl_argument
     34    (* dpl_arg   ≝ *) psd_argument
     35    (* dph_arg   ≝ *) psd_argument
     36    (* snd_arg   ≝ *) psd_argument
    3937    (* pair_move ≝ *) (move_dst × move_src)
    4038    (* call_args ≝ *) ℕ
     
    5048      (* localsT ≝ *) register).
    5149
    52   definition ertl_params ≝ mk_graph_params ertl_uns_params.
    53   definition ertl_internal_function ≝
    54   λglobals. joint_internal_function globals ertl_params.
     50definition ertl_params ≝ mk_graph_params ertl_uns_params.
    5551definition ertl_program ≝ joint_program ertl_params.
    5652
     
    6965unification hint 0 ≔
    7066(*---------------*) ⊢
    71 acc_a_arg ertl_params ≡ rtl_argument.
     67acc_a_arg ertl_params ≡ psd_argument.
    7268unification hint 0 ≔
    7369(*---------------*) ⊢
    74 acc_b_arg ertl_params ≡ rtl_argument.
     70acc_b_arg ertl_params ≡ psd_argument.
    7571unification hint 0 ≔
    7672(*---------------*) ⊢
     
    8177unification hint 0 ≔
    8278(*---------------*) ⊢
    83 dpl_arg ertl_params ≡ rtl_argument.
     79dpl_arg ertl_params ≡ psd_argument.
    8480unification hint 0 ≔
    8581(*---------------*) ⊢
    86 dph_arg ertl_params ≡ rtl_argument.
     82dph_arg ertl_params ≡ psd_argument.
    8783unification hint 0 ≔
    8884(*---------------*) ⊢
    89 snd_arg ertl_params ≡ rtl_argument.
     85snd_arg ertl_params ≡ psd_argument.
    9086unification hint 0 ≔
    9187(*---------------*) ⊢
     
    105101ext_tailcall ertl_params ≡ void.
    106102
    107 coercion reg_to_ertl_snd_argument : ∀r : register.snd_arg ertl_params ≝ Reg
     103coercion reg_to_ertl_snd_argument : ∀r : register.snd_arg ertl_params ≝
     104  psd_argument_from_reg
    108105  on _r : register to snd_arg ertl_params.
    109 coercion byte_to_ertl_snd_argument : ∀b : Byte.snd_arg ertl_params ≝ Imm
     106coercion byte_to_ertl_snd_argument : ∀b : Byte.snd_arg ertl_params ≝
     107  psd_argument_from_byte
    110108  on _b : Byte to snd_arg ertl_params.
    111109 
Note: See TracChangeset for help on using the changeset viewer.