Add preliminary support for IP control
This commit is contained in:
parent
b2f7a80395
commit
843cf63ba9
5
prefetcher_reverse/src/bin/ip_test.rs
Normal file
5
prefetcher_reverse/src/bin/ip_test.rs
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
use prefetcher_reverse::ip_tool::tmp_test;
|
||||||
|
|
||||||
|
fn main() {
|
||||||
|
tmp_test();
|
||||||
|
}
|
@ -0,0 +1,20 @@
|
|||||||
|
global_asm!(
|
||||||
|
".global timed_maccess_template",
|
||||||
|
"timed_maccess_template:",
|
||||||
|
"nop",
|
||||||
|
"ret",
|
||||||
|
".global timed_maccess_template_end",
|
||||||
|
"timed_maccess_template_end:",
|
||||||
|
"nop",
|
||||||
|
);
|
||||||
|
|
||||||
|
extern "C" {
|
||||||
|
fn timed_maccess_template(pointer: *const u8) -> u64;
|
||||||
|
fn timed_maccess_template_end();
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn tmp_test() {
|
||||||
|
let size = timed_maccess_template_end as *const u8 as usize
|
||||||
|
- timed_maccess_template as *const u8 as usize;
|
||||||
|
println!("function size : {}", size);
|
||||||
|
}
|
@ -1,3 +1,4 @@
|
|||||||
|
#![feature(global_asm)]
|
||||||
#![deny(unsafe_op_in_unsafe_fn)]
|
#![deny(unsafe_op_in_unsafe_fn)]
|
||||||
|
|
||||||
use crate::Probe::{Flush, FullFlush, Load};
|
use crate::Probe::{Flush, FullFlush, Load};
|
||||||
|
Loading…
Reference in New Issue
Block a user