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.
This commit is contained in:
Michael Matz 2019-06-24 05:18:08 +02:00
parent 6599483304
commit 942b73bbbb

View File

@ -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;