From 942b73bbbb8460d42f99880c11014613350717b9 Mon Sep 17 00:00:00 2001 From: Michael Matz Date: Mon, 24 Jun 2019 05:18:08 +0200 Subject: [PATCH] Try fixing asm_dot_test on Windows its GAS lacks .pushsection/.popsection and .previous, so we must manually switch back to .text in the snippets on that platform. --- tests/tcctest.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/tcctest.c b/tests/tcctest.c index 49bf8639..b60960d9 100644 --- a/tests/tcctest.c +++ b/tests/tcctest.c @@ -3451,10 +3451,18 @@ void asm_dot_test(void) case 2: asm(".text; jmp .+6; .int 123; mov .-4"RX",%eax; jmp p0"); case 3: +#ifndef _WIN32 asm(".pushsection \".data\"; Y=.; .int 999; X=Y; .int 456; X=.-4; .popsection"); +#else + asm(".data; Y=.; .int 999; X=Y; .int 456; X=.-4; .text"); +#endif asm(".text; mov X"RX",%eax; jmp p0"); case 4: +#ifndef _WIN32 asm(".data; X=.; .int 789; Y=.; .int 999; .previous"); +#else + asm(".data; X=.; .int 789; Y=.; .int 999; .text"); +#endif asm(".text; mov X"RX",%eax; X=Y; jmp p0"); case 0: asm(".text; p0=.; mov %%eax,%0;" : "=m"(r)); break;