From ec14b75b80b449022501c291090ec2808acd25c8 Mon Sep 17 00:00:00 2001 From: Simonas Kazlauskas Date: Fri, 27 Oct 2023 15:03:30 +0300 Subject: [PATCH] zkasm: address compilation failures in the backend after merge --- cranelift/codegen/src/isa/zkasm/inst/emit.rs | 2 +- cranelift/codegen/src/isa/zkasm/inst/mod.rs | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/cranelift/codegen/src/isa/zkasm/inst/emit.rs b/cranelift/codegen/src/isa/zkasm/inst/emit.rs index 312d6c3b24d7..0f7aa621f320 100644 --- a/cranelift/codegen/src/isa/zkasm/inst/emit.rs +++ b/cranelift/codegen/src/isa/zkasm/inst/emit.rs @@ -659,7 +659,7 @@ impl MachInstEmit for Inst { // For now we only support calls. assert!(info.opcode.is_call()); sink.add_call_site(info.opcode); - sink.add_reloc(Reloc::RiscvCall, &info.dest, 0); + sink.add_reloc(Reloc::RiscvCallPlt, &info.dest, 0); // This will be patched externally to do a necessary jump. put_string(&format!("; CALL {name}\n"), sink); diff --git a/cranelift/codegen/src/isa/zkasm/inst/mod.rs b/cranelift/codegen/src/isa/zkasm/inst/mod.rs index 6ec1357eb469..a576e1b061ba 100644 --- a/cranelift/codegen/src/isa/zkasm/inst/mod.rs +++ b/cranelift/codegen/src/isa/zkasm/inst/mod.rs @@ -664,6 +664,10 @@ impl MachInst for Inst { preferred: 4, } } + + fn is_mem_access(&self) -> bool { + todo!("FILL ME OUT") + } } //=============================================================================