mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 05:49:08 +00:00
add function calls and maybe fix function call relocations?
This commit is contained in:
parent
356f225b5d
commit
027b8aff4d
4 changed files with 22 additions and 3 deletions
|
@ -858,8 +858,13 @@ impl Assembler<AArch64GeneralReg, AArch64FloatReg> for AArch64Assembler {
|
|||
}
|
||||
|
||||
#[inline(always)]
|
||||
fn call(_buf: &mut Vec<'_, u8>, _relocs: &mut Vec<'_, Relocation>, _fn_name: String) {
|
||||
todo!("calling functions literal for AArch64");
|
||||
fn call(buf: &mut Vec<'_, u8>, relocs: &mut Vec<'_, Relocation>, fn_name: String) {
|
||||
let inst = 0b1001_0100_0000_0000_0000_0000_0000u32;
|
||||
buf.extend(inst.to_le_bytes());
|
||||
relocs.push(Relocation::LinkedFunction {
|
||||
offset: buf.len() as u64 - 4,
|
||||
name: fn_name,
|
||||
});
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
|
|
|
@ -731,6 +731,9 @@ impl<
|
|||
fn relocations_mut(&mut self) -> &mut Vec<'a, Relocation> {
|
||||
&mut self.relocs
|
||||
}
|
||||
fn target_info(&self) -> TargetInfo {
|
||||
self.storage_manager.target_info
|
||||
}
|
||||
fn module_interns_helpers_mut(
|
||||
&mut self,
|
||||
) -> (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue