Skip to content

Commit

Permalink
Remove the unused sigid argument purpose (bytecodealliance#5753)
Browse files Browse the repository at this point in the history
  • Loading branch information
bjorn3 authored Feb 9, 2023
1 parent a2d356d commit 202d3af
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 14 deletions.
9 changes: 0 additions & 9 deletions cranelift/codegen/src/ir/extfunc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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",
})
}
Expand All @@ -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(")") {
Expand Down Expand Up @@ -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)"),
];
Expand Down
7 changes: 2 additions & 5 deletions cranelift/docs/ir.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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 |
Expand Down

0 comments on commit 202d3af

Please sign in to comment.