diff --git a/Cargo.toml b/Cargo.toml index fe3027c..2fd9f3b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "gccjit" -version = "2.6.0" +version = "2.7.0" authors = ["Sean Gillespie ", "Antoni Boucher "] description = "Higher-level Rust bindings for libgccjit." keywords = ["compiler", "jit", "gcc"] @@ -13,7 +13,7 @@ readme = "README.md" master = ["gccjit_sys/master"] [dependencies] -gccjit_sys = { version = "0.7.0", path = "gccjit_sys" } +gccjit_sys = { version = "0.8.0", path = "gccjit_sys" } [package.metadata.docs.rs] features = ["master"] diff --git a/gccjit_sys/Cargo.toml b/gccjit_sys/Cargo.toml index a23ed39..54d62eb 100644 --- a/gccjit_sys/Cargo.toml +++ b/gccjit_sys/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "gccjit_sys" -version = "0.7.0" +version = "0.8.0" authors = ["Sean Gillespie ", "Antoni Boucher "] #links = "gccjit" description = "Raw bindings to libgccjit. Companion to the gccjit crate." diff --git a/gccjit_sys/src/lib.rs b/gccjit_sys/src/lib.rs index 6f1a2b2..2511155 100644 --- a/gccjit_sys/src/lib.rs +++ b/gccjit_sys/src/lib.rs @@ -276,6 +276,8 @@ pub enum gcc_jit_fn_attribute GCC_JIT_FN_ATTRIBUTE_CONST, GCC_JIT_FN_ATTRIBUTE_WEAK, GCC_JIT_FN_ATTRIBUTE_NONNULL, + GCC_JIT_FN_ATTRIBUTE_ARM_CMSE_NONSECURE_CALL, + GCC_JIT_FN_ATTRIBUTE_ARM_CMSE_NONSECURE_ENTRY, GCC_JIT_FN_ATTRIBUTE_ARM_PCS, GCC_JIT_FN_ATTRIBUTE_AVR_INTERRUPT, GCC_JIT_FN_ATTRIBUTE_AVR_NOBLOCK, @@ -283,6 +285,7 @@ pub enum gcc_jit_fn_attribute GCC_JIT_FN_ATTRIBUTE_GCN_AMDGPU_HSA_KERNEL, GCC_JIT_FN_ATTRIBUTE_MSP430_INTERRUPT, GCC_JIT_FN_ATTRIBUTE_NVPTX_KERNEL, + GCC_JIT_FN_ATTRIBUTE_RISCV_INTERRUPT, GCC_JIT_FN_ATTRIBUTE_X86_FAST_CALL, GCC_JIT_FN_ATTRIBUTE_X86_INTERRUPT, GCC_JIT_FN_ATTRIBUTE_X86_MS_ABI, diff --git a/src/function.rs b/src/function.rs index 7982e93..1e3fb6b 100644 --- a/src/function.rs +++ b/src/function.rs @@ -60,6 +60,8 @@ pub enum FnAttribute<'a> { Const, Weak, NonNull(Vec), + ArmCmseNonsecureCall, + ArmCmseNonsecureEntry, ArmPcs(&'a str), AvrInterrupt, AvrNoblock, @@ -67,6 +69,7 @@ pub enum FnAttribute<'a> { GcnAmdGpuHsaKernel, Msp430Interrupt, NvptxKernel, + RiscvInterrupt(&'a str), X86FastCall, X86Interrupt, X86MsAbi, @@ -79,8 +82,8 @@ pub enum FnAttribute<'a> { impl<'a> FnAttribute<'a> { fn get_value(&self) -> AttributeValue { match *self { - FnAttribute::Alias(value) | FnAttribute::ArmPcs(value) | FnAttribute::Target(value) => - AttributeValue::String(value), + FnAttribute::Alias(value) | FnAttribute::ArmPcs(value)| FnAttribute::RiscvInterrupt(value) + | FnAttribute::Target(value) => AttributeValue::String(value), FnAttribute::Visibility(visibility) => AttributeValue::String(visibility.as_str()), FnAttribute::AlwaysInline | FnAttribute::Inline @@ -91,6 +94,8 @@ impl<'a> FnAttribute<'a> { | FnAttribute::Pure | FnAttribute::Const | FnAttribute::Weak + | FnAttribute::ArmCmseNonsecureCall + | FnAttribute::ArmCmseNonsecureEntry | FnAttribute::AvrInterrupt | FnAttribute::AvrNoblock | FnAttribute::AvrSignal @@ -128,6 +133,8 @@ impl<'a> FnAttribute<'a> { FnAttribute::Const => gccjit_sys::gcc_jit_fn_attribute::GCC_JIT_FN_ATTRIBUTE_CONST, FnAttribute::Weak => gccjit_sys::gcc_jit_fn_attribute::GCC_JIT_FN_ATTRIBUTE_WEAK, FnAttribute::NonNull(_) => gccjit_sys::gcc_jit_fn_attribute::GCC_JIT_FN_ATTRIBUTE_NONNULL, + FnAttribute::ArmCmseNonsecureCall => gccjit_sys::gcc_jit_fn_attribute::GCC_JIT_FN_ATTRIBUTE_ARM_CMSE_NONSECURE_CALL, + FnAttribute::ArmCmseNonsecureEntry => gccjit_sys::gcc_jit_fn_attribute::GCC_JIT_FN_ATTRIBUTE_ARM_CMSE_NONSECURE_ENTRY, FnAttribute::ArmPcs(_) => gccjit_sys::gcc_jit_fn_attribute::GCC_JIT_FN_ATTRIBUTE_ARM_PCS, FnAttribute::AvrInterrupt => gccjit_sys::gcc_jit_fn_attribute::GCC_JIT_FN_ATTRIBUTE_AVR_INTERRUPT, FnAttribute::AvrNoblock => gccjit_sys::gcc_jit_fn_attribute::GCC_JIT_FN_ATTRIBUTE_AVR_NOBLOCK, @@ -135,6 +142,7 @@ impl<'a> FnAttribute<'a> { FnAttribute::GcnAmdGpuHsaKernel => gccjit_sys::gcc_jit_fn_attribute::GCC_JIT_FN_ATTRIBUTE_GCN_AMDGPU_HSA_KERNEL, FnAttribute::Msp430Interrupt => gccjit_sys::gcc_jit_fn_attribute::GCC_JIT_FN_ATTRIBUTE_MSP430_INTERRUPT, FnAttribute::NvptxKernel => gccjit_sys::gcc_jit_fn_attribute::GCC_JIT_FN_ATTRIBUTE_NVPTX_KERNEL, + FnAttribute::RiscvInterrupt(_) => gccjit_sys::gcc_jit_fn_attribute::GCC_JIT_FN_ATTRIBUTE_RISCV_INTERRUPT, FnAttribute::X86FastCall => gccjit_sys::gcc_jit_fn_attribute::GCC_JIT_FN_ATTRIBUTE_X86_FAST_CALL, FnAttribute::X86Interrupt => gccjit_sys::gcc_jit_fn_attribute::GCC_JIT_FN_ATTRIBUTE_X86_INTERRUPT, FnAttribute::X86MsAbi => gccjit_sys::gcc_jit_fn_attribute::GCC_JIT_FN_ATTRIBUTE_X86_MS_ABI,