summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/asmjit/test/asmjitutils.h
diff options
context:
space:
mode:
author Patrick Mackinlay <pmackinlay@hotmail.com>2022-02-11 17:16:46 +0700
committer Patrick Mackinlay <pmackinlay@hotmail.com>2022-02-13 21:26:55 +0700
commit1fba2b4f2c27a2f4162855056f9765ee79db31e9 (patch)
treef98b63565a8b12895b0bb057c0790b88b11a7b2e /3rdparty/asmjit/test/asmjitutils.h
parent3a7e08d47d4e1b0e075360e19be1763d9b29f557 (diff)
asmjit: sync with upstream
Diffstat (limited to '3rdparty/asmjit/test/asmjitutils.h')
-rw-r--r--3rdparty/asmjit/test/asmjitutils.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/3rdparty/asmjit/test/asmjitutils.h b/3rdparty/asmjit/test/asmjitutils.h
new file mode 100644
index 00000000000..d84d3d4c742
--- /dev/null
+++ b/3rdparty/asmjit/test/asmjitutils.h
@@ -0,0 +1,38 @@
+// This file is part of AsmJit project <https://asmjit.com>
+//
+// See asmjit.h or LICENSE.md for license and copyright information
+// SPDX-License-Identifier: Zlib
+
+#ifndef ASMJITUTILS_H_INCLUDED
+#define ASMJITUTILS_H_INCLUDED
+
+#include <asmjit/core.h>
+
+static const char* asmjitArchAsString(asmjit::Arch arch) noexcept {
+ switch (arch) {
+ case asmjit::Arch::kX86 : return "X86";
+ case asmjit::Arch::kX64 : return "X64";
+
+ case asmjit::Arch::kRISCV32 : return "RISCV32";
+ case asmjit::Arch::kRISCV64 : return "RISCV64";
+
+ case asmjit::Arch::kARM : return "ARM";
+ case asmjit::Arch::kAArch64 : return "AArch64";
+ case asmjit::Arch::kThumb : return "Thumb";
+
+ case asmjit::Arch::kMIPS32_LE : return "MIPS_LE";
+ case asmjit::Arch::kMIPS64_LE : return "MIPS64_LE";
+
+ case asmjit::Arch::kARM_BE : return "ARM_BE";
+ case asmjit::Arch::kThumb_BE : return "Thumb_BE";
+ case asmjit::Arch::kAArch64_BE: return "AArch64_BE";
+
+ case asmjit::Arch::kMIPS32_BE : return "MIPS_BE";
+ case asmjit::Arch::kMIPS64_BE : return "MIPS64_BE";
+
+ default:
+ return "<Unknown>";
+ }
+}
+
+#endif // ASMJITUTILS_H_INCLUDED