[Bug jit/64873] jit testsuite failures on powerpc64le-unknown-linux-gnu
dmalcolm at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Jan 30 16:46:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64873
--- Comment #2 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
I think this is misconfigurfation at my end; sorry.
I'm on power7 hw, emulating via qemu, and I did *not*
configure with the options suggested by Jakub in comment #1;
so I think I'm misconfiguring the build.
A minimal reproducer for the behavior I'm seeing:
$ cat main.c
#include <assert.h>
union int_or_float
{
int as_int;
float as_float;
};
float __attribute__ ((noinline))
test_union (int i)
{
union int_or_float u;
u.as_int = i;
return u.as_float;
}
int
main (int argc, char **argv)
{
union int_or_float u;
float f_result = test_union (42);
u.as_float = f_result;
assert (u.as_int == 42);
return 0;
}
(eof)
Compiling with -O1 or above, with -mcpu=power8:
gcc -O1 main.c -mcpu=power8
I get SIGILL:
(gdb) disassemble
Dump of assembler code for function test_union:
0x0000000010000624 <+0>: rldicr r9,r3,32,31
=> 0x0000000010000628 <+4>: mtvsrd vs1,r9
0x000000001000062c <+8>: xscvspdpn vs1,vs1
0x0000000010000630 <+12>: blr
0x0000000010000634 <+16>: .long 0x0
0x0000000010000638 <+20>: .long 0x0
0x000000001000063c <+24>: .long 0x0
presumably due to not actually being on power8.
I'll rerun the JIT build and tests, with the correct configuration flags for
this hardware, and with the candidate patches for PR jit/64810 (so that the
jit honors them).
More information about the Gcc-bugs
mailing list