Remove the unused sigid argument purpose (#5753)

This commit is contained in:
bjorn3
2023-02-09 18:18:39 +01:00
committed by GitHub
parent a2d356d45e
commit 202d3af16a
2 changed files with 2 additions and 14 deletions

View File

@@ -252,12 +252,6 @@ pub enum ArgumentPurpose {
/// used as a base pointer for `vmctx` global values. /// used as a base pointer for `vmctx` global values.
VMContext, 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. /// A stack limit pointer.
/// ///
/// This is a pointer to a stack limit. It is used to check the current stack 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::StructArgument(size) => return write!(f, "sarg({})", size),
Self::StructReturn => "sret", Self::StructReturn => "sret",
Self::VMContext => "vmctx", Self::VMContext => "vmctx",
Self::SignatureId => "sigid",
Self::StackLimit => "stack_limit", Self::StackLimit => "stack_limit",
}) })
} }
@@ -285,7 +278,6 @@ impl FromStr for ArgumentPurpose {
"normal" => Ok(Self::Normal), "normal" => Ok(Self::Normal),
"sret" => Ok(Self::StructReturn), "sret" => Ok(Self::StructReturn),
"vmctx" => Ok(Self::VMContext), "vmctx" => Ok(Self::VMContext),
"sigid" => Ok(Self::SignatureId),
"stack_limit" => Ok(Self::StackLimit), "stack_limit" => Ok(Self::StackLimit),
_ if s.starts_with("sarg(") => { _ if s.starts_with("sarg(") => {
if !s.ends_with(")") { if !s.ends_with(")") {
@@ -392,7 +384,6 @@ mod tests {
(ArgumentPurpose::Normal, "normal"), (ArgumentPurpose::Normal, "normal"),
(ArgumentPurpose::StructReturn, "sret"), (ArgumentPurpose::StructReturn, "sret"),
(ArgumentPurpose::VMContext, "vmctx"), (ArgumentPurpose::VMContext, "vmctx"),
(ArgumentPurpose::SignatureId, "sigid"),
(ArgumentPurpose::StackLimit, "stack_limit"), (ArgumentPurpose::StackLimit, "stack_limit"),
(ArgumentPurpose::StructArgument(42), "sarg(42)"), (ArgumentPurpose::StructArgument(42), "sarg(42)"),
]; ];

View File

@@ -351,7 +351,7 @@ paramlist : param { "," param }
retlist : paramlist retlist : paramlist
param : type [paramext] [paramspecial] param : type [paramext] [paramspecial]
paramext : "uext" | "sext" 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" callconv : "fast" | "cold" | "system_v" | "windows_fastcall"
| "wasmtime_system_v" | "wasmtime_fastcall" | "wasmtime_system_v" | "wasmtime_fastcall"
| "apple_aarch64" | "wasmtime_apple_aarch64" | "apple_aarch64" | "wasmtime_apple_aarch64"
@@ -366,12 +366,9 @@ system, a function's calling convention is only fully determined by a
| Name | Description | | Name | Description |
| ----------| ---------- | | ----------| ---------- |
| sarg | pointer to a struct argument of the given size |
| sret | pointer to a return value in memory | | 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. | | 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 | | stack_limit | limit value for the size of the stack |
| Name | Description | | Name | Description |