From 202d3af16aa59566216f0bb519cb4c1a030c6586 Mon Sep 17 00:00:00 2001 From: bjorn3 <17426603+bjorn3@users.noreply.github.com> Date: Thu, 9 Feb 2023 18:18:39 +0100 Subject: [PATCH] Remove the unused sigid argument purpose (#5753) --- cranelift/codegen/src/ir/extfunc.rs | 9 --------- cranelift/docs/ir.md | 7 ++----- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/cranelift/codegen/src/ir/extfunc.rs b/cranelift/codegen/src/ir/extfunc.rs index bc56104aaf88..e3822c6e401c 100644 --- a/cranelift/codegen/src/ir/extfunc.rs +++ b/cranelift/codegen/src/ir/extfunc.rs @@ -252,12 +252,6 @@ pub enum ArgumentPurpose { /// used as a base pointer for `vmctx` global values. VMContext, - /// A signature identifier. - /// - /// This is a special-purpose argument used to identify the calling convention expected by the - /// caller in an indirect call. The callee can verify that the expected signature ID matches. - SignatureId, - /// A stack limit pointer. /// /// This is a pointer to a stack limit. It is used to check the current stack pointer @@ -272,7 +266,6 @@ impl fmt::Display for ArgumentPurpose { Self::StructArgument(size) => return write!(f, "sarg({})", size), Self::StructReturn => "sret", Self::VMContext => "vmctx", - Self::SignatureId => "sigid", Self::StackLimit => "stack_limit", }) } @@ -285,7 +278,6 @@ impl FromStr for ArgumentPurpose { "normal" => Ok(Self::Normal), "sret" => Ok(Self::StructReturn), "vmctx" => Ok(Self::VMContext), - "sigid" => Ok(Self::SignatureId), "stack_limit" => Ok(Self::StackLimit), _ if s.starts_with("sarg(") => { if !s.ends_with(")") { @@ -392,7 +384,6 @@ mod tests { (ArgumentPurpose::Normal, "normal"), (ArgumentPurpose::StructReturn, "sret"), (ArgumentPurpose::VMContext, "vmctx"), - (ArgumentPurpose::SignatureId, "sigid"), (ArgumentPurpose::StackLimit, "stack_limit"), (ArgumentPurpose::StructArgument(42), "sarg(42)"), ]; diff --git a/cranelift/docs/ir.md b/cranelift/docs/ir.md index 6568c40e841a..08afb650c9e7 100644 --- a/cranelift/docs/ir.md +++ b/cranelift/docs/ir.md @@ -351,7 +351,7 @@ paramlist : param { "," param } retlist : paramlist param : type [paramext] [paramspecial] paramext : "uext" | "sext" -paramspecial : "sarg" ( num ) | "sret" | "vmctx" | "sigid" | "stack_limit" +paramspecial : "sarg" ( num ) | "sret" | "vmctx" | "stack_limit" callconv : "fast" | "cold" | "system_v" | "windows_fastcall" | "wasmtime_system_v" | "wasmtime_fastcall" | "apple_aarch64" | "wasmtime_apple_aarch64" @@ -366,12 +366,9 @@ system, a function's calling convention is only fully determined by a | Name | Description | | ----------| ---------- | +| sarg | pointer to a struct argument of the given size | | sret | pointer to a return value in memory | -| link | return address | -| fp | the initial value of the frame pointer | -| csr | callee-saved register | | vmctx | VM context pointer, which may contain pointers to heaps etc. | -| sigid | signature id, for checking caller/callee signature compatibility | | stack_limit | limit value for the size of the stack | | Name | Description |