aboutsummaryrefslogtreecommitdiffstats
path: root/riscV/Asmexpand.ml
diff options
context:
space:
mode:
Diffstat (limited to 'riscV/Asmexpand.ml')
-rw-r--r--riscV/Asmexpand.ml9
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