/* See include/pub_tool_libcsetjmp.h for background and rationale. */
/* The alternative implementations are for ppc{32,64}-linux and
- {amd64,x86}-{linux,darwin}. See #259977. That leaves only
+ {amd64,x86}-{linux,darwin,solaris}. See #259977. That leaves only
{arm,s390x}-linux using the gcc builtins now.
*/
#endif /* VGP_ppc64be_linux */
-/* ------------ amd64-{linux,darwin} ------------ */
+/* -------- amd64-{linux,darwin,solaris} -------- */
-#if defined(VGP_amd64_linux) || defined(VGP_amd64_darwin)
+#if defined(VGP_amd64_linux) || defined(VGP_amd64_darwin) || \
+ defined(VGP_amd64_solaris)
__asm__(
".text" "\n"
"" "\n"
-#if defined(VGP_amd64_linux)
+#if defined(VGP_amd64_linux) || defined(VGP_amd64_solaris)
".global VG_MINIMAL_SETJMP" "\n" // rdi = jmp_buf
"VG_MINIMAL_SETJMP:" "\n"
"" "\n"
-#if defined(VGP_amd64_linux)
+#if defined(VGP_amd64_linux) || defined(VGP_amd64_solaris)
".global VG_MINIMAL_LONGJMP" "\n"
"VG_MINIMAL_LONGJMP:" "\n" // rdi = jmp_buf
#endif
);
-#endif /* VGP_amd64_linux || VGP_amd64_darwin */
+#endif /* VGP_amd64_linux || VGP_amd64_darwin || VGP_amd64_solaris */
-/* ------------ x86-{linux,darwin} ------------ */
+/* -------- x86-{linux,darwin,solaris} -------- */
-#if defined(VGP_x86_linux) || defined(VGP_x86_darwin)
+#if defined(VGP_x86_linux) || defined(VGP_x86_darwin) || \
+ defined(VGP_x86_solaris)
__asm__(
".text" "\n"
"" "\n"
-#if defined(VGP_x86_linux)
+#if defined(VGP_x86_linux) || defined(VGP_x86_solaris)
".global VG_MINIMAL_SETJMP" "\n" // eax = jmp_buf
"VG_MINIMAL_SETJMP:" "\n"
"" "\n"
-#if defined(VGP_x86_linux)
+#if defined(VGP_x86_linux) || defined(VGP_x86_solaris)
".global VG_MINIMAL_LONGJMP" "\n"
"VG_MINIMAL_LONGJMP:" "\n" // eax = jmp_buf
#endif
);
-#endif /* VGP_x86_linux || VGP_x86_darwin */
+#endif /* VGP_x86_linux || VGP_x86_darwin || VGP_x86_solaris */
#if defined(VGP_mips32_linux)
void VG_MINIMAL_LONGJMP(VG_MINIMAL_JMP_BUF(_env));
-#elif defined(VGP_amd64_linux) || defined(VGP_amd64_darwin)
+#elif defined(VGP_amd64_linux) || defined(VGP_amd64_darwin) || \
+ defined(VGP_amd64_solaris)
#define VG_MINIMAL_JMP_BUF(_name) ULong _name [16+1]
__attribute__((returns_twice))
void VG_MINIMAL_LONGJMP(VG_MINIMAL_JMP_BUF(_env));
-#elif defined(VGP_x86_linux) || defined(VGP_x86_darwin)
+#elif defined(VGP_x86_linux) || defined(VGP_x86_darwin) || \
+ defined(VGP_x86_solaris)
#define VG_MINIMAL_JMP_BUF(_name) UInt _name [8+1]
__attribute__((returns_twice))