On 9 June 2016 at 14:31, Jakub Jelinek <ja...@redhat.com> wrote: > On Thu, Jun 09, 2016 at 02:18:44PM +0200, Christophe Lyon wrote: >> On 8 June 2016 at 16:50, Jakub Jelinek <ja...@redhat.com> wrote: >> > On Wed, Jun 08, 2016 at 04:44:00PM +0200, Christophe Lyon wrote: >> >> I've tried the attached patch (which does only dg-options -> >> >> dg-additional-options). >> >> For GCC, it's better, except that on arm-none-eabi qemu complains about >> >> an illegal instruction when asked to use arm926 and GCC is configured with >> >> the default cpu. Maybe that's because check_vect does not have the >> >> expected >> > >> > check_vect installs a SIGILL handler and if the insn is invalid, excepts >> > a signal to be raised. Is that not the case with qemu? Or is qemu just >> > being too noisy? >> > >> qemu complains when executing check_vect's prologue, which contains >> movw r1, #35712 >> which is not supported either on arm926. > > Bet it depends if this happens before the signal(SIGILL, sig_ill_handler); > call or after it. If before, then I guess you'd better rewrite the > long long a = 0, b = 1; > asm ("vorr %P0, %P1, %P2" > : "=w" (a) > : "0" (a), "w" (b)); > if (a != 1)
Of course you are right: it happens just before the call to signal, to build the sig_ill_handler address in r1. So it's not even a problem with rewriting the asm. > fully into inline asm, if after, then it is likely either just too noisy > qemu, or misdesigned issue in qemu. > > Jakub