diff options
author | Jimmy Miller <jimmy.miller@shopify.com> | 2022-10-18 14:19:41 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-18 14:19:41 -0400 |
commit | b2ba71df9efd2e484cce955a398f2894702c7de0 (patch) | |
tree | be98d1904990365f472195d5676475d9ab8420ff /yjit/src/asm | |
parent | e7166c9bb78e20531a9cbb372e460ecd12603b5e (diff) | |
download | ruby-b2ba71df9efd2e484cce955a398f2894702c7de0.tar.gz |
Code clean around unused code for some architectures or features (#6581)
Diffstat (limited to 'yjit/src/asm')
-rw-r--r-- | yjit/src/asm/mod.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/yjit/src/asm/mod.rs b/yjit/src/asm/mod.rs index 1ab813964c..6fce8384c6 100644 --- a/yjit/src/asm/mod.rs +++ b/yjit/src/asm/mod.rs @@ -1,5 +1,4 @@ use std::cell::RefCell; -use std::cmp; use std::fmt; use std::mem; use std::rc::Rc; @@ -7,8 +6,6 @@ use std::rc::Rc; use crate::backend::x86_64::JMP_PTR_BYTES; #[cfg(target_arch = "aarch64")] use crate::backend::arm64::JMP_PTR_BYTES; -use crate::backend::ir::Assembler; -use crate::backend::ir::Target; use crate::virtualmem::WriteError; #[cfg(feature = "asm_comments")] @@ -154,7 +151,7 @@ impl CodeBlock { // We could remember the last write_pos in page2 and let set_page use that position, // but you need to waste some space for keeping write_pos for every single page. // It doesn't seem necessary for performance either. So we're currently not doing it. - let mut dst_pos = self.page_size * page_idx + self.page_start(); + let dst_pos = self.page_size * page_idx + self.page_start(); if self.page_size * page_idx < self.mem_size && self.write_pos < dst_pos { // Reset dropped_bytes self.dropped_bytes = false; @@ -216,6 +213,8 @@ impl CodeBlock { self.page_end_reserve = old_page_end_reserve; } + #[cfg(target_arch = "aarch64")] + #[cfg(not(test))] /// Return the address ranges of a given address range that this CodeBlock can write. pub fn writable_addrs(&self, start_ptr: CodePtr, end_ptr: CodePtr) -> Vec<(usize, usize)> { let mut addrs = vec![]; |