[Bug libffi/83636] libffi/mips/n32: don't .set mips4 for mips r6

syq at debian dot org gcc-bugzilla@gcc.gnu.org
Wed Jan 3 02:11:00 GMT 2018


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83636

--- Comment #1 from YunQiang Su <syq at debian dot org> ---
and we found a new problem of libffi:

https://github.com/libffi/libffi/pull/401

   /* lui  $12,high(codeloc) */
    tramp[2] = 0x3c0c0000 | ((unsigned)codeloc >> 16);
    /* jr   $25          */
 +#if !defined(__mips_isa_rev) || (__mips_isa_rev<6)
    tramp[3] = 0x03200008;
 +#else
 +  tramp[3] = 0x03200009;
 +#endif
    /* ori  $12,low(codeloc)  */
    tramp[4] = 0x358c0000 | ((unsigned)codeloc & 0xffff);
  #else
 @@ -743,7 +747,11 @@ ffi_prep_closure_loc (ffi_closure *closure,
    /* ori  $25,low(fn)  */
    tramp[10] = 0x37390000 | ((unsigned long)fn  & 0xffff);
    /* jr   $25          */
 +#if !defined(__mips_isa_rev) || (__mips_isa_rev<6)
    tramp[11] = 0x03200008;
 +#else
 +  tramp[11] = 0x03200009;
 +#endif
    /* ori  $12,low(codeloc)  */
    tramp[12] = 0x358c0000 | ((unsigned long)codeloc & 0xffff);


More information about the Gcc-bugs mailing list