diff options
author | Merry <[email protected]> | 2024-03-02 19:36:24 +0000 |
---|---|---|
committer | Merry <[email protected]> | 2024-03-02 19:36:30 +0000 |
commit | 8125738fa2d0d4b9f25b47080d51a3fb6263b962 (patch) | |
tree | 181145b2b5bf4e72960d20d6f72808e4ed209a61 /externals/biscuit/tests/src/assembler_test_utils.hpp | |
parent | fa6cc2e4b2a2954f2298b6548174479c5b106c2a (diff) | |
parent | e4a733d5b2e02e7095847892f29ed8288d55d91e (diff) | |
download | dynarmic-8125738fa2d0d4b9f25b47080d51a3fb6263b962.tar.gz dynarmic-8125738fa2d0d4b9f25b47080d51a3fb6263b962.zip |
externals: Add biscuit
Merge commit 'e4a733d5b2e02e7095847892f29ed8288d55d91e' as 'externals/biscuit'
Diffstat (limited to 'externals/biscuit/tests/src/assembler_test_utils.hpp')
-rw-r--r-- | externals/biscuit/tests/src/assembler_test_utils.hpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/externals/biscuit/tests/src/assembler_test_utils.hpp b/externals/biscuit/tests/src/assembler_test_utils.hpp new file mode 100644 index 00000000..a20737dc --- /dev/null +++ b/externals/biscuit/tests/src/assembler_test_utils.hpp @@ -0,0 +1,23 @@ +#pragma once + +#include <biscuit/assembler.hpp> +#include <cstdint> + +namespace biscuit { + +template <typename T> +inline Assembler MakeAssembler32(T& buffer) { + return Assembler{reinterpret_cast<uint8_t*>(&buffer), sizeof(buffer), ArchFeature::RV32}; +} + +template <typename T> +inline Assembler MakeAssembler64(T& buffer) { + return Assembler{reinterpret_cast<uint8_t*>(&buffer), sizeof(buffer), ArchFeature::RV64}; +} + +template <typename T> +inline Assembler MakeAssembler128(T& buffer) { + return Assembler{reinterpret_cast<uint8_t*>(&buffer), sizeof(buffer), ArchFeature::RV128}; +} + +} // namespace biscuit |