diff options
author | Léo Gourdin <leo.gourdin@univ-grenoble-alpes.fr> | 2021-05-19 18:17:31 +0200 |
---|---|---|
committer | Léo Gourdin <leo.gourdin@univ-grenoble-alpes.fr> | 2021-05-19 18:17:31 +0200 |
commit | be8d929aef8e86c2e22e32c525093c6bfe56a300 (patch) | |
tree | 9026f38d9251477da228ba0d27706d448d7b7cfb /riscV/Asmexpand.ml | |
parent | a6545d8fa35ab4ab3a12823eafacff99d7307314 (diff) | |
download | compcert-kvx-be8d929aef8e86c2e22e32c525093c6bfe56a300.tar.gz compcert-kvx-be8d929aef8e86c2e22e32c525093c6bfe56a300.zip |
Adding both RV expansion methods in kvx-work
Diffstat (limited to 'riscV/Asmexpand.ml')
-rw-r--r-- | riscV/Asmexpand.ml | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/riscV/Asmexpand.ml b/riscV/Asmexpand.ml index 3f9d3359..c5cd6817 100644 --- a/riscV/Asmexpand.ml +++ b/riscV/Asmexpand.ml @@ -23,7 +23,6 @@ open Asm open Asmexpandaux open AST open Camlcoq -open Asmgen open! Integers exception Error of string @@ -45,13 +44,11 @@ let align n a = (n + a - 1) land (-a) (* Emit instruction sequences that set or offset a register by a constant. *) let expand_loadimm32 dst n = - match make_immed32 n with - | Imm32_single imm -> emit (Paddiw (dst, X0, imm)) - | Imm32_pair (hi, lo) -> List.iter emit (load_hilo32 dst hi lo []) + List.iter emit (Asmgen.loadimm32 dst n []) let expand_addptrofs dst src n = - List.iter emit (addptrofs dst src n []) + List.iter emit (Asmgen.addptrofs dst src n []) let expand_storeind_ptr src base ofs = - List.iter emit (storeind_ptr src base ofs []) + List.iter emit (Asmgen.storeind_ptr src base ofs []) (* Built-ins. They come in two flavors: - annotation statements: take their arguments in registers or stack |