From bc6fbecbdaebf6c61b777d97e687f1244fa113c4 Mon Sep 17 00:00:00 2001 From: David Nadlinger Date: Tue, 10 Nov 2020 19:53:39 +0100 Subject: [PATCH] compiler, firmware: Do not expose abort() to kernels This was only exposed for the assert implementation, and does not exist on Zynq. --- artiq/compiler/transforms/llvm_ir_generator.py | 4 ---- artiq/firmware/ksupport/api.rs | 1 - 2 files changed, 5 deletions(-) diff --git a/artiq/compiler/transforms/llvm_ir_generator.py b/artiq/compiler/transforms/llvm_ir_generator.py index 003de3c1a..8ee010cc7 100644 --- a/artiq/compiler/transforms/llvm_ir_generator.py +++ b/artiq/compiler/transforms/llvm_ir_generator.py @@ -374,8 +374,6 @@ class LLVMIRGenerator: llty = ll.FunctionType(llvoid, [self.llty_of_type(builtins.TException())]) elif name == "__artiq_reraise": llty = ll.FunctionType(llvoid, []) - elif name in "abort": - llty = ll.FunctionType(llvoid, []) elif name == "memcmp": llty = ll.FunctionType(lli32, [llptr, llptr, lli32]) elif name == "rpc_send": @@ -1143,8 +1141,6 @@ class LLVMIRGenerator: def process_Builtin(self, insn): if insn.op == "nop": return self.llbuilder.call(self.llbuiltin("llvm.donothing"), []) - if insn.op == "abort": - return self.llbuilder.call(self.llbuiltin("abort"), []) elif insn.op == "is_some": lloptarg = self.map(insn.operands[0]) return self.llbuilder.extract_value(lloptarg, 0, diff --git a/artiq/firmware/ksupport/api.rs b/artiq/firmware/ksupport/api.rs index 89a6f638c..873dc6f71 100644 --- a/artiq/firmware/ksupport/api.rs +++ b/artiq/firmware/ksupport/api.rs @@ -63,7 +63,6 @@ static mut API: &'static [(&'static str, *const ())] = &[ api!(__powidf2), /* libc */ - api!(abort = ::abort), api!(memcmp, extern { fn memcmp(a: *const u8, b: *mut u8, size: usize); }), /* libm */