CallConv causes SIGSEGV with --disable-tables-next-to-code
When building with --disable-tables-next-to-code
on OpenBSD-amd64
testsuite/tests/codeGen/should_run/CallConv.hs
seems to not be using the right
calling convention. The continuation address pointed at by %rbp
is not
sensible in this case.
(gdb) bt
#0 0x0000000000354048 in someFuncF ()
#1 0x0000000000000000 in ?? ()
(gdb) disassemble
Dump of assembler code for function someFuncF:
=> 0x0000000000354048 <+0>: movss %xmm1,%xmm0
0x000000000035404c <+4>: subss %xmm2,%xmm0
0x0000000000354050 <+8>: addss %xmm2,%xmm1
0x0000000000354054 <+12>: movss %xmm0,%xmm2
0x0000000000354058 <+16>: movss %xmm3,%xmm0
0x000000000035405c <+20>: divss %xmm4,%xmm0
0x0000000000354060 <+24>: mulss %xmm4,%xmm3
0x0000000000354064 <+28>: movss %xmm0,%xmm4
0x0000000000354068 <+32>: jmpq *0x0(%rbp)
End of assembler dump.
(gdb) p/x $rbp
$1 = 0x2af505330
(gdb) p/x *((uint64_t*) $rbp)
$2 = 0x6882c0
(gdb) disassemble 0x00000000006882c0
No function contains specified address.
(gdb) c
Program received signal SIGSEGV, Segmentation fault.
0x00000000006882c0 in ?? ()
I guess this assembly code relies on TNTC and so the test should be made conditional on that setting.