pub enum ExpressionOpcode<'a> {
Show 50 variants
RefExpression(ReferenceExpressionOpcode<'a>),
Buffer(Buffer<'a>),
Package(Package<'a>),
VarPackage(VarPackage<'a>),
Acquire {
mutex: SuperName<'a>,
timeout: u16,
},
Add(TermArg<'a>, TermArg<'a>, Target<'a>),
BitwiseAnd(TermArg<'a>, TermArg<'a>, Target<'a>),
Concat(TermArg<'a>, TermArg<'a>, Target<'a>),
ConcatRes(TermArg<'a>, TermArg<'a>, Target<'a>),
CondRefOf(SuperName<'a>, Target<'a>),
CopyObject(TermArg<'a>, SimpleName),
Decrement(SuperName<'a>),
Divide {
dividend: TermArg<'a>,
divisor: TermArg<'a>,
remainder: Target<'a>,
quotient: Target<'a>,
},
FindSetLeftBit(TermArg<'a>, Target<'a>),
FindSetRightBit(TermArg<'a>, Target<'a>),
FromBCD(TermArg<'a>, Target<'a>),
Increment(SuperName<'a>),
LogicalAnd(TermArg<'a>, TermArg<'a>),
Equal(TermArg<'a>, TermArg<'a>),
Greater(TermArg<'a>, TermArg<'a>),
GreaterEqual(TermArg<'a>, TermArg<'a>),
Less(TermArg<'a>, TermArg<'a>),
LessEqual(TermArg<'a>, TermArg<'a>),
LogicalNot(TermArg<'a>),
NotEqual(TermArg<'a>, TermArg<'a>),
LoadTable {
signature: TermArg<'a>,
oem_id: TermArg<'a>,
oem_table_id: TermArg<'a>,
root_path: TermArg<'a>,
parameter_path: TermArg<'a>,
parameter_data: TermArg<'a>,
},
LogicalOr(TermArg<'a>, TermArg<'a>),
Match {
search_package: TermArg<'a>,
a: (MatchOpcode, TermArg<'a>),
b: (MatchOpcode, TermArg<'a>),
start_index: TermArg<'a>,
},
Mid {
source: TermArg<'a>,
index: TermArg<'a>,
length: TermArg<'a>,
result: Target<'a>,
},
Mod(TermArg<'a>, TermArg<'a>, Target<'a>),
Multiply(TermArg<'a>, TermArg<'a>, Target<'a>),
Nand(TermArg<'a>, TermArg<'a>, Target<'a>),
Nor(TermArg<'a>, TermArg<'a>, Target<'a>),
BitwiseNot(TermArg<'a>, Target<'a>),
ObjectType(SuperName<'a>),
BitwiseOr(TermArg<'a>, TermArg<'a>, Target<'a>),
ShiftLeft(TermArg<'a>, TermArg<'a>, Target<'a>),
ShiftRight(TermArg<'a>, TermArg<'a>, Target<'a>),
SizeOf(SuperName<'a>),
Store(TermArg<'a>, SuperName<'a>),
Subtract(TermArg<'a>, TermArg<'a>, Target<'a>),
Timer,
ToBCD(TermArg<'a>, Target<'a>),
ToBuffer(TermArg<'a>, Target<'a>),
ToDecimalString(TermArg<'a>, Target<'a>),
ToHexString(TermArg<'a>, Target<'a>),
ToInteger(TermArg<'a>, Target<'a>),
ToString {
source: TermArg<'a>,
length: TermArg<'a>,
result: Target<'a>,
},
Wait {
event: SuperName<'a>,
timeout: TermArg<'a>,
},
BitwiseXor(TermArg<'a>, TermArg<'a>, Target<'a>),
}
Expand description
Terminal operation that evaluates to a value or reference.
Variants§
RefExpression(ReferenceExpressionOpcode<'a>)
Buffer(Buffer<'a>)
Package(Package<'a>)
VarPackage(VarPackage<'a>)
Acquire
Try to acquire a mutex, returning true if the attempt times out
Add(TermArg<'a>, TermArg<'a>, Target<'a>)
Add two integers
BitwiseAnd(TermArg<'a>, TermArg<'a>, Target<'a>)
Compute a bitwise AND of two integers
Concat(TermArg<'a>, TermArg<'a>, Target<'a>)
Concatenate two strings or buffers
ConcatRes(TermArg<'a>, TermArg<'a>, Target<'a>)
Concatenate two buffers containing resource templates
CondRefOf(SuperName<'a>, Target<'a>)
Try to create a reference, returning false if it is not possible
CopyObject(TermArg<'a>, SimpleName)
Update the destination with a copy of the given value, without converting
its type. Compare with ExpressionOpcode::Store
.
Decrement(SuperName<'a>)
Decrement an integer variable
Divide
Perform integer (quotient-remainder) division
FindSetLeftBit(TermArg<'a>, Target<'a>)
Get the index of the most-significant set bit in a value
FindSetRightBit(TermArg<'a>, Target<'a>)
Get the index of the least-significant set bit in a value
FromBCD(TermArg<'a>, Target<'a>)
Decode a series of binary-coded decimal nibbles into an integer
Increment(SuperName<'a>)
Increment an integer variable
LogicalAnd(TermArg<'a>, TermArg<'a>)
Evaluate to true if both arguments are non-zero integers
Equal(TermArg<'a>, TermArg<'a>)
Evaluate to true if both values are equal
Greater(TermArg<'a>, TermArg<'a>)
Evaluate to true if the left value is greater than the right value
GreaterEqual(TermArg<'a>, TermArg<'a>)
Evaluate to true if the left value is greater than or equal to the right value
Less(TermArg<'a>, TermArg<'a>)
Evaluate to true if the left value is less than the right value
LessEqual(TermArg<'a>, TermArg<'a>)
Evaluate to true if the left value is less than or equal to the right value
LogicalNot(TermArg<'a>)
Evaluate to true if the value is zero
NotEqual(TermArg<'a>, TermArg<'a>)
Evaluate to true if the left value is not equal to the right value
LoadTable
Find an ACPI table indexed by the XSDT
Fields
LogicalOr(TermArg<'a>, TermArg<'a>)
Evaluate to true if either of the values is a non-zero integer
Match
Search a package and return the index of the first contained value that matches both specified conditions
Mid
Copy a slice of a string or buffer.
Mod(TermArg<'a>, TermArg<'a>, Target<'a>)
Compute the remainder of dividing the first integer by the second
Multiply(TermArg<'a>, TermArg<'a>, Target<'a>)
Multiply two integers
Nand(TermArg<'a>, TermArg<'a>, Target<'a>)
Compute the bitwise NAND of two integers
Nor(TermArg<'a>, TermArg<'a>, Target<'a>)
Compute the bitwise NOR of two integers
BitwiseNot(TermArg<'a>, Target<'a>)
Invert the bits of an integer
ObjectType(SuperName<'a>)
Get an integer representing the type of the given value. See ObjectType
.
BitwiseOr(TermArg<'a>, TermArg<'a>, Target<'a>)
Compute the bitwise OR of the two integers
ShiftLeft(TermArg<'a>, TermArg<'a>, Target<'a>)
Multiply an integer by the specified power of two
ShiftRight(TermArg<'a>, TermArg<'a>, Target<'a>)
Divide an integer by the specified power of two
SizeOf(SuperName<'a>)
Get the length of a string, buffer, or package
Store(TermArg<'a>, SuperName<'a>)
Update the destination with the given value, converting it to the type of the
previous value. Compare with ExpressionOpcode::CopyObject
.
Subtract(TermArg<'a>, TermArg<'a>, Target<'a>)
Subtract an integer from another, ignoring underflow
Timer
Get the current value of the system timer in 100ns
ToBCD(TermArg<'a>, Target<'a>)
Encode an integer into a sequence of binary-coded decimal nibbles
ToBuffer(TermArg<'a>, Target<'a>)
Convert a value to a buffer
ToDecimalString(TermArg<'a>, Target<'a>)
Encode a value as an ASCII decimal number
ToHexString(TermArg<'a>, Target<'a>)
Encode a value as an ASCII hexadecimal number
ToInteger(TermArg<'a>, Target<'a>)
Convert a value to an integer, either by parsing a string or taking the first bytes of a buffer.
ToString
Copy an ASCII string from a buffer into a string value
Wait
Try to wait for another thread to signal an event object, returning true if the attempt times out
BitwiseXor(TermArg<'a>, TermArg<'a>, Target<'a>)
Compute the bitwise XOR of two integers
Trait Implementations§
Source§impl<'a> Clone for ExpressionOpcode<'a>
impl<'a> Clone for ExpressionOpcode<'a>
Source§fn clone(&self) -> ExpressionOpcode<'a>
fn clone(&self) -> ExpressionOpcode<'a>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl<'a> Debug for ExpressionOpcode<'a>
impl<'a> Debug for ExpressionOpcode<'a>
Source§impl<'a> From<Buffer<'a>> for ExpressionOpcode<'a>
impl<'a> From<Buffer<'a>> for ExpressionOpcode<'a>
Source§fn from(b: Buffer<'a>) -> ExpressionOpcode<'a>
fn from(b: Buffer<'a>) -> ExpressionOpcode<'a>
Source§impl<'a> From<ExpressionOpcode<'a>> for TermArg<'a>
impl<'a> From<ExpressionOpcode<'a>> for TermArg<'a>
Source§fn from(e: ExpressionOpcode<'a>) -> TermArg<'a>
fn from(e: ExpressionOpcode<'a>) -> TermArg<'a>
Source§impl<'a> From<ExpressionOpcode<'a>> for TermObject<'a>
impl<'a> From<ExpressionOpcode<'a>> for TermObject<'a>
Source§fn from(e: ExpressionOpcode<'a>) -> TermObject<'a>
fn from(e: ExpressionOpcode<'a>) -> TermObject<'a>
Source§impl<'a> From<Package<'a>> for ExpressionOpcode<'a>
impl<'a> From<Package<'a>> for ExpressionOpcode<'a>
Source§fn from(p: Package<'a>) -> ExpressionOpcode<'a>
fn from(p: Package<'a>) -> ExpressionOpcode<'a>
Source§impl<'a> From<ReferenceExpressionOpcode<'a>> for ExpressionOpcode<'a>
impl<'a> From<ReferenceExpressionOpcode<'a>> for ExpressionOpcode<'a>
Source§fn from(r: ReferenceExpressionOpcode<'a>) -> ExpressionOpcode<'a>
fn from(r: ReferenceExpressionOpcode<'a>) -> ExpressionOpcode<'a>
Source§impl<'a> From<VarPackage<'a>> for ExpressionOpcode<'a>
impl<'a> From<VarPackage<'a>> for ExpressionOpcode<'a>
Source§fn from(p: VarPackage<'a>) -> ExpressionOpcode<'a>
fn from(p: VarPackage<'a>) -> ExpressionOpcode<'a>
Source§impl<'a> Parse<'a> for ExpressionOpcode<'a>
Grammar:
impl<'a> Parse<'a> for ExpressionOpcode<'a>
Grammar:
Type2Opcode := DefAcquire | DefAdd | DefAnd | DefBuffer | DefConcat |
DefConcatRes | DefCondRefOf | DefCopyObject | DefDecrement |
DefDerefOf | DefDivide | DefFindSetLeftBit | DefFindSetRightBit |
DefFromBCD | DefIncrement | DefIndex | DefLAnd | DefLEqual |
DefLGreater | DefLGreaterEqual | DefLLess | DefLLessEqual | DefMid |
DefLNot | DefLNotEqual | DefLoadTable | DefLOr | DefMatch | DefMod |
DefMultiply | DefNAnd | DefNOr | DefNot | DefObjectType | DefOr |
DefPackage | DefVarPackage | DefRefOf | DefShiftLeft |
DefShiftRight | DefSizeOf | DefStore | DefSubtract | DefTimer |
DefToBCD | DefToBuffer | DefToDecimalString | DefToHexString |
DefToInteger | DefToString | DefWait | DefXOr | MethodInvocation