From 318415dac813f0cece415dbf0257c28d501e2222 Mon Sep 17 00:00:00 2001
From: Cheng Shao <terrorjack@type.dance>
Date: Mon, 7 Oct 2024 21:28:43 +0000
Subject: [PATCH] testsuite: fix T16180 on wasm

This commit fixes T16180 on wasm once TH support is flipped on. The
fix is simply adding right asm code for wasm.

(cherry picked from commit 69bb4745218d2d54c82e33fa529ccf9ba3819fac)
---
 testsuite/tests/th/T16180.hs | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/testsuite/tests/th/T16180.hs b/testsuite/tests/th/T16180.hs
index 99b1a3bb510..88859285384 100644
--- a/testsuite/tests/th/T16180.hs
+++ b/testsuite/tests/th/T16180.hs
@@ -11,7 +11,14 @@ $(do
    -- could reuse FP_LEADING_UNDERSCORE from aclocal.m4 for this
    -- somehow, but this hopefully is OK for now.
    addForeignSource LangAsm $ unlines
-#if defined(darwin_HOST_OS) || (defined(mingw32_HOST_OS) && WORD_SIZE_IN_BITS == 32)
+#if defined(wasm32_HOST_ARCH)
+      [ ".section .rodata.mydata,\"\",@"
+      , ".globl mydata"
+      , "mydata:"
+      , ".asciz \"Hello world\""
+      , ".size mydata, 12"
+      ]
+#elif defined(darwin_HOST_OS) || (defined(mingw32_HOST_OS) && WORD_SIZE_IN_BITS == 32)
       [ ".global \"_mydata\""
       , "_mydata:"
       , ".ascii \"Hello world\\0\""
-- 
GitLab