About fpr usage in mips64

Ian Lance Taylor iant@google.com
Wed Nov 30 23:01:00 GMT 2011

Heiher <admin@heiher.info> writes:

> I want to use ICT Loongson 3A extension SIMD instructions in o32 ABI
> program. The march loongson3a is based on mips64. -mfp32 don't work...

I guess I don't know what it means to use -mips64 with -mabi=32.  I'm
not surprised that it doesn't work.  I don't even think this is is a
bug.  You explained why you want to use -mips64, but why do you want to
use -mabi=32?  Why not just recompile the program?

If you can't recompile the program, then as far as I can see you are
going to have to write some sort of stubs to call between your o32 code
and your mips64 code.


> On Wed, Nov 30, 2011 at 2:42 PM, Ian Lance Taylor <iant@google.com> wrote:
>> Heiher <admin@heiher.info> writes:
>>> The o32 abi programs could only use even-numbered floating-point
>>> registers by appointment. The GCC generate assembly source  code using
>>> odd-numbered floating-point register when I -march=mips64 and
>>> -mabi=32. Every double floating-point instructions will use 32-bit
>>> even/odd-numbered paired 64-bit fpr when 0 = bit FR in Status
>>> register. However kernel set bit FR to a thread at loading ELF for N32
>>> or 64 only. In other words, o32 abi process can't use odd-numbered
>>> fpr.
>>> How ought I to act? Thanks!
>> I'm not sure it makes sense to use -march=mips64 -mabi=32.  Why do you
>> want to do that?
>> You could try using the -mfp32 option but I don't know whether it will
>> help.
>> Ian

More information about the Gcc-help mailing list