diff options
author | Cyril SIX <cyril.six@kalray.eu> | 2019-04-09 16:31:45 +0200 |
---|---|---|
committer | Cyril SIX <cyril.six@kalray.eu> | 2019-04-09 16:31:45 +0200 |
commit | 049c3f1a34e5af8d9c59b54bd3270dca863f5366 (patch) | |
tree | 1a4272acaaf1d080877542ef163fccfff22ce1b8 /mppa_k1c | |
parent | bdf78e029c7900f427e0feb57ad752d0a0e98e0b (diff) | |
download | compcert-kvx-049c3f1a34e5af8d9c59b54bd3270dca863f5366.tar.gz compcert-kvx-049c3f1a34e5af8d9c59b54bd3270dca863f5366.zip |
Fixing missing features in Asmexpand.ml (EF_annot, EF_annot_val, EF_inline_asm)
Diffstat (limited to 'mppa_k1c')
-rw-r--r-- | mppa_k1c/Asmexpand.ml | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/mppa_k1c/Asmexpand.ml b/mppa_k1c/Asmexpand.ml index 6310b8ae..d12b9785 100644 --- a/mppa_k1c/Asmexpand.ml +++ b/mppa_k1c/Asmexpand.ml @@ -111,16 +111,13 @@ let fixup_call sg = (* Handling of annotations *) -let expand_annot_val kind txt targ args res = assert false -(*emit (Pbuiltin (EF_annot(kind,txt,[targ]), args, BR_none)); +let expand_annot_val kind txt targ args res = + emit (Pbuiltin (EF_annot(kind,txt,[targ]), args, BR_none)); match args, res with - | [BA(IR src)], BR(IR dst) -> + | [BA(Asmvliw.IR src)], BR(Asmvliw.IR dst) -> if dst <> src then emit (Pmv (dst, src)) - | [BA(FR src)], BR(FR dst) -> - if dst <> src then emit (Pfmv (dst, src)) | _, _ -> raise (Error "ill-formed __builtin_annot_val") -*) (* Handling of memcpy *) @@ -465,10 +462,10 @@ let expand_instruction instr = | EF_malloc -> failwith "asmexpand: malloc" | EF_free -> failwith "asmexpand: free" | EF_debug _ -> failwith "asmexpand: debug" - | EF_annot _ -> failwith "asmexpand: annot" - | EF_annot_val _ -> failwith "asmexpand: annot_val" + | EF_annot _ -> emit instr + | EF_annot_val (kind, txt, targ) -> expand_annot_val kind txt targ args res | EF_external _ -> failwith "asmexpand: external" - | EF_inline_asm _ -> failwith "asmexpand: inline asm" + | EF_inline_asm _ -> emit instr | EF_runtime _ -> failwith "asmexpand: runtime" end | _ -> |