summaryrefslogtreecommitdiff
path: root/yjit/src/backend/tests.rs
diff options
context:
space:
mode:
Diffstat (limited to 'yjit/src/backend/tests.rs')
-rw-r--r--yjit/src/backend/tests.rs15
1 files changed, 7 insertions, 8 deletions
diff --git a/yjit/src/backend/tests.rs b/yjit/src/backend/tests.rs
index 01e87fe26c..ac2f35b3d9 100644
--- a/yjit/src/backend/tests.rs
+++ b/yjit/src/backend/tests.rs
@@ -1,19 +1,19 @@
#![cfg(test)]
-use crate::asm::{CodeBlock};
+use crate::asm::CodeBlock;
use crate::backend::ir::*;
use crate::cruby::*;
use crate::utils::c_callable;
#[test]
fn test_add() {
- let mut asm = Assembler::new();
+ let mut asm = Assembler::new(0);
let out = asm.add(SP, Opnd::UImm(1));
let _ = asm.add(out, Opnd::UImm(2));
}
#[test]
fn test_alloc_regs() {
- let mut asm = Assembler::new();
+ let mut asm = Assembler::new(0);
// Get the first output that we're going to reuse later.
let out1 = asm.add(EC, Opnd::UImm(1));
@@ -62,7 +62,7 @@ fn test_alloc_regs() {
fn setup_asm() -> (Assembler, CodeBlock) {
return (
- Assembler::new(),
+ Assembler::new(0),
CodeBlock::new_dummy(1024)
);
}
@@ -194,7 +194,7 @@ fn test_c_call()
#[test]
fn test_alloc_ccall_regs() {
- let mut asm = Assembler::new();
+ let mut asm = Assembler::new(0);
let out1 = asm.ccall(0 as *const u8, vec![]);
let out2 = asm.ccall(0 as *const u8, vec![out1]);
asm.mov(EC, out2);
@@ -283,8 +283,7 @@ fn test_bake_string() {
#[test]
fn test_draining_iterator() {
-
- let mut asm = Assembler::new();
+ let mut asm = Assembler::new(0);
let _ = asm.load(Opnd::None);
asm.store(Opnd::None, Opnd::None);
@@ -315,7 +314,7 @@ fn test_cmp_8_bit() {
fn test_no_pos_marker_callback_when_compile_fails() {
// When compilation fails (e.g. when out of memory), the code written out is malformed.
// We don't want to invoke the pos_marker callbacks with positions of malformed code.
- let mut asm = Assembler::new();
+ let mut asm = Assembler::new(0);
// Markers around code to exhaust memory limit
let fail_if_called = |_code_ptr, _cb: &_| panic!("pos_marker callback should not be called");