libtest fails on mingw since d04ce77 (2019-05-30)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

libtest fails on mingw since d04ce77 (2019-05-30)

avih
(re-sending this message, not sure if the previous send got through)

I noticed that libtest fails with mingw since commit:
d04ce77 Don't allow section switches in local asm instructions - Michael Matz

with the following error:

------------ libtest ------------
./libtcc_test.exe -B../../win32 -I../../include -I../.. -I.. -L..
Hello World!
fib(32) = 2178309
add(32, 64) = 96
gcc.exe -o tcctest.gcc ../../tests/tcctest.c -DTCC_TARGET_X86_64 -DTCC_TARGET_PE -fno-strict-aliasing -I.. -I../..  -w -O0 -std=gnu99 -fno-omit-frame-pointer
/tmp/ccUS0anU.s: Assembler messages:
/tmp/ccUS0anU.s:10423: Error: unknown pseudo-op: `.pushsection'
/tmp/ccUS0anU.s:10423: Error: unknown pseudo-op: `.popsection'
/tmp/ccUS0anU.s:10432: Error: unknown pseudo-op: `.previous'
make[2]: *** [Makefile:87: test.ref] Error 1

Tested with mingw 32 and 64 in msys2 (gcc 9.1.0), and in mingw gcc 64 which I built using MXE (gcc 5.5.0) in cygwin.

All tests pass with the previous commit (1dd6842).

_______________________________________________
Tinycc-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel
Reply | Threaded
Open this post in threaded view
|

Re: libtest fails on mingw since d04ce77 (2019-05-30)

Michael Matz-4
Hi,

On Sun, 23 Jun 2019, [hidden email] wrote:

> d04ce77 Don't allow section switches in local asm instructions - Michael Matz
>
> with the following error:
>
> ------------ libtest ------------
> ./libtcc_test.exe -B../../win32 -I../../include -I../.. -I.. -L..
> Hello World!
> fib(32) = 2178309
> add(32, 64) = 96
> gcc.exe -o tcctest.gcc ../../tests/tcctest.c -DTCC_TARGET_X86_64 -DTCC_TARGET_PE -fno-strict-aliasing -I.. -I../..  -w -O0 -std=gnu99 -fno-omit-frame-pointer
> /tmp/ccUS0anU.s: Assembler messages:
> /tmp/ccUS0anU.s:10423: Error: unknown pseudo-op: `.pushsection'
> /tmp/ccUS0anU.s:10423: Error: unknown pseudo-op: `.popsection'
> /tmp/ccUS0anU.s:10432: Error: unknown pseudo-op: `.previous'

I tried fixing this in mob by not using those directives.  I've used the
_WIN32 preprocessor define as condition.  In case that's not enough for
mingw64 (maybe it only uses _WIN64?) please adjust accordingly.


Ciao,
Michael.

_______________________________________________
Tinycc-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel
Reply | Threaded
Open this post in threaded view
|

Re: libtest fails on mingw since d04ce77 (2019-05-30)

Christian Jullien-3
There are two more cases to handle in this file:

  asm volatile (".globl some_symbol\n"
                "jmp .+6\n"
                "1:\n"
                "some_symbol: .long 0\n"
                ".pushsection __bug_table, \"a\"\n"
                ".globl bug_table\n"
                "bug_table:\n"
                /* The first entry (1b-2b) is unused in this test,
                   but we include it to check if cross-section
                   PC-relative references work.  */
                "2:\t.long 1b - 2b, %c0 - 2b\n"
                ".popsection\n" : : "i" ("A string"));

And

asm(".data\n"
    ".byte 41\n"
    "alld_stuff:\n"
    "661:\n"
    ".byte 42\n"
    "662:\n"
    ".pushsection .data.ignore\n"
    ".long 661b - .\n" /* This reference to 661 generates an external sym
                          which shouldn't somehow overwrite the offset that's
                          already determined for it.  */
    ".popsection\n"
    ".byte 662b - 661b\n"  /* So that this value is undeniably 1.  */);

C.

-----Original Message-----
From: Tinycc-devel [mailto:tinycc-devel-bounces+eligis=[hidden email]] On Behalf Of Michael Matz
Sent: Monday, June 24, 2019 05:21
To: [hidden email]
Subject: Re: [Tinycc-devel] libtest fails on mingw since d04ce77 (2019-05-30)

Hi,

On Sun, 23 Jun 2019, [hidden email] wrote:

> d04ce77 Don't allow section switches in local asm instructions - Michael Matz
>
> with the following error:
>
> ------------ libtest ------------
> ./libtcc_test.exe -B../../win32 -I../../include -I../.. -I.. -L..
> Hello World!
> fib(32) = 2178309
> add(32, 64) = 96
> gcc.exe -o tcctest.gcc ../../tests/tcctest.c -DTCC_TARGET_X86_64 -DTCC_TARGET_PE -fno-strict-aliasing -I.. -I../..  -w -O0 -std=gnu99 -fno-omit-frame-pointer
> /tmp/ccUS0anU.s: Assembler messages:
> /tmp/ccUS0anU.s:10423: Error: unknown pseudo-op: `.pushsection'
> /tmp/ccUS0anU.s:10423: Error: unknown pseudo-op: `.popsection'
> /tmp/ccUS0anU.s:10432: Error: unknown pseudo-op: `.previous'

I tried fixing this in mob by not using those directives.  I've used the
_WIN32 preprocessor define as condition.  In case that's not enough for
mingw64 (maybe it only uses _WIN64?) please adjust accordingly.


Ciao,
Michael.

_______________________________________________
Tinycc-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel


_______________________________________________
Tinycc-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel
Reply | Threaded
Open this post in threaded view
|

Re: libtest fails on mingw since d04ce77 (2019-05-30)

avih
In reply to this post by Michael Matz-4

Hi,

Confirmed commit 942b73b is fixed for mingw 32 and 64.
Thanks.

On Monday, June 24, 2019, 6:21:51 AM GMT+3, Michael Matz <[hidden email]> wrote:


Hi,

On Sun, 23 Jun 2019, [hidden email] wrote:

> d04ce77 Don't allow section switches in local asm instructions - Michael Matz
>
> with the following error:
>
> ------------ libtest ------------
> ./libtcc_test.exe -B../../win32 -I../../include -I../.. -I.. -L..
> Hello World!
> fib(32) = 2178309
> add(32, 64) = 96
> gcc.exe -o tcctest.gcc ../../tests/tcctest.c -DTCC_TARGET_X86_64 -DTCC_TARGET_PE -fno-strict-aliasing -I.. -I../..  -w -O0 -std=gnu99 -fno-omit-frame-pointer
> /tmp/ccUS0anU.s: Assembler messages:
> /tmp/ccUS0anU.s:10423: Error: unknown pseudo-op: `.pushsection'
> /tmp/ccUS0anU.s:10423: Error: unknown pseudo-op: `.popsection'
> /tmp/ccUS0anU.s:10432: Error: unknown pseudo-op: `.previous'

I tried fixing this in mob by not using those directives.  I've used the
_WIN32 preprocessor define as condition.  In case that's not enough for
mingw64 (maybe it only uses _WIN64?) please adjust accordingly.


Ciao,

Michael.


_______________________________________________
Tinycc-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel


_______________________________________________
Tinycc-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel