summaryrefslogtreecommitdiffstats
path: root/js/src/ctypes/libffi/testsuite/libffi.go/static-chain.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 19:33:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 19:33:14 +0000
commit36d22d82aa202bb199967e9512281e9a53db42c9 (patch)
tree105e8c98ddea1c1e4784a60a5a6410fa416be2de /js/src/ctypes/libffi/testsuite/libffi.go/static-chain.h
parentInitial commit. (diff)
downloadfirefox-esr-upstream.tar.xz
firefox-esr-upstream.zip
Adding upstream version 115.7.0esr.upstream/115.7.0esrupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'js/src/ctypes/libffi/testsuite/libffi.go/static-chain.h')
-rw-r--r--js/src/ctypes/libffi/testsuite/libffi.go/static-chain.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/js/src/ctypes/libffi/testsuite/libffi.go/static-chain.h b/js/src/ctypes/libffi/testsuite/libffi.go/static-chain.h
new file mode 100644
index 0000000000..3675b40a54
--- /dev/null
+++ b/js/src/ctypes/libffi/testsuite/libffi.go/static-chain.h
@@ -0,0 +1,19 @@
+#ifdef __aarch64__
+# define STATIC_CHAIN_REG "x18"
+#elif defined(__alpha__)
+# define STATIC_CHAIN_REG "$1"
+#elif defined(__arm__)
+# define STATIC_CHAIN_REG "ip"
+#elif defined(__sparc__)
+# if defined(__arch64__) || defined(__sparcv9)
+# define STATIC_CHAIN_REG "g5"
+# else
+# define STATIC_CHAIN_REG "g2"
+# endif
+#elif defined(__x86_64__)
+# define STATIC_CHAIN_REG "r10"
+#elif defined(__i386__)
+# ifndef ABI_NUM
+# define STATIC_CHAIN_REG "ecx" /* FFI_DEFAULT_ABI only */
+# endif
+#endif