About fpr usage in mips64

Heiher admin@heiher.info
Thu Dec 1 01:23:00 GMT 2011

Loongson-3a specific instructions are used in this program, so I use
"-march=loongson3a -mabi=32" to compile it. The configure script will use
-march to probe whether these instructions are supported, and I don't want
to break this behavior. P.S: Loongson-3a is mips64 compatible, it has the
same behavior to use FPRs as mips64.

On Thu, Dec 1, 2011 at 12:57 AM, Ian Lance Taylor <iant@google.com> wrote:
> 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.
> Ian
>> 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

Best regards!

More information about the Gcc-help mailing list