mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-25 18:58:56 +00:00
LibWasm: Implement checked truncation instructions
This implements the 8 i<n>.truncate.f<n>_<s> instructions.
This commit is contained in:
parent
59e01e2813
commit
a21ebae652
Notes:
sideshowbarker
2024-07-18 17:23:08 +09:00
Author: https://github.com/alimpfard
Commit: a21ebae652
Pull-request: https://github.com/SerenityOS/serenity/pull/7395
Reviewed-by: https://github.com/linusg
3 changed files with 86 additions and 10 deletions
|
@ -20,6 +20,13 @@ private:
|
|||
ReadonlyBytes load_from_memory(Configuration&, const Instruction&, size_t);
|
||||
void store_to_memory(Configuration&, const Instruction&, ReadonlyBytes data);
|
||||
void call_address(Configuration&, FunctionAddress);
|
||||
|
||||
template<typename V, typename T>
|
||||
MakeUnsigned<T> checked_unsigned_truncate(V);
|
||||
|
||||
template<typename V, typename T>
|
||||
MakeSigned<T> checked_signed_truncate(V);
|
||||
|
||||
Vector<NonnullOwnPtr<Value>> pop_values(Configuration& configuration, size_t count);
|
||||
bool trap_if_not(bool value)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue