If you could confirm that the BE host results above match those on real hardware then that would be great as I've switched over to use macros that should do the right thing regardless of host endian.
Finally if you have access to a more comprehensive test suite then that would be helpful to test more of the 64-bit DFP number paths and some of more esoteric DFP instructions.
Sorry I didn't get a chance to look at this before I went away on holiday, however I've just posted a patchset at https:/ /lists. gnu.org/ archive/ html/qemu- devel/2019- 09/msg05577. html which should resolve the issue for you.
With the above patchset applied I now see the following results with your test program:
LE host: e-linux- gnu -cpu power9 test-denbcdqle 000000000000000 0000 000000000000000 000c 000000000000000 0000 e-linux- gnu -cpu power9 test-denbcdqle 1 000000000000000 0001 000000000000000 001c 000000000000000 0001 e-linux- gnu -cpu power9 test-denbcdqle $(seq 0 99) 000000000000000 0064 000000000000000 100c 000000000000000 0080
$ ../qemu-ppc64le -L /usr/powerpc64l
0x0000000000000
0x0000000000000
0x2208000000000
$ ../qemu-ppc64le -L /usr/powerpc64l
0x0000000000000
0x0000000000000
0x2208000000000
$ ../qemu-ppc64le -L /usr/powerpc64l
0x0000000000000
0x0000000000000
0x2208000000000
BE host: linux-gnu -cpu power9 test-denbcdq 000000000000000 0000 00c000000000000 0000 000220800000000 0000 linux-gnu -cpu power9 test-denbcdq 1 001000000000000 0000 01c000000000000 0000 001220800000000 0000 linux-gnu -cpu power9 test-denbcdq $(seq 0 99) 064000000000000 0000 00c000000000000 0000 080220800000000 0000
$ ../qemu-ppc64 -L /usr/powerpc64-
0x0000000000000
0x0000000000000
0x0000000000000
$ ../qemu-ppc64 -L /usr/powerpc64-
0x0000000000000
0x0000000000000
0x0000000000000
$ ../qemu-ppc64 -L /usr/powerpc64-
0x0000000000000
0x0000000000001
0x0000000000000
If you could confirm that the BE host results above match those on real hardware then that would be great as I've switched over to use macros that should do the right thing regardless of host endian.
Finally if you have access to a more comprehensive test suite then that would be helpful to test more of the 64-bit DFP number paths and some of more esoteric DFP instructions.