[nvptx] Fix printing of 128-bit constant (negative case)
authorTom de Vries <tdevries@suse.de>
Fri, 11 Sep 2020 03:40:36 +0000 (05:40 +0200)
committerTom de Vries <tdevries@suse.de>
Fri, 11 Sep 2020 05:27:54 +0000 (07:27 +0200)
commit60e537a026c037d8f3e5678acd148f9e44b4fb9c
tree7ff10798396325141304df53bfd180a4342fbbf9
parent848e74bea1e8031925d3efe2d85b555a3cf8db38
[nvptx] Fix printing of 128-bit constant (negative case)

For this code:
...
__int128 min_one = -1;
...
we currently generate:
...
.visible .global .align 8 .u64 min_one[2] = { -1, 0 };
...

Fix this in nvptx_assemble_value, such that we have instead:
...
.visible .global .align 8 .u64 min_one[2] = { -1, -1 };
...

gcc/ChangeLog:

* config/nvptx/nvptx.c (nvptx_assemble_value): Handle negative
__int128.

gcc/testsuite/ChangeLog:

* gcc.target/nvptx/int128.c: New test.
gcc/config/nvptx/nvptx.c
gcc/testsuite/gcc.target/nvptx/int128.c [new file with mode: 0644]