On Fri, 2026-01-23 at 09:44 +0800, mengqinggang wrote:
> When adding LoongArch32 ilp32s abi support, add TARGET_HARD_FLOAT condition 
> for
> movsf to prevent matching in soft float abi.

TARGET_HARD_FLOAT has nothing to do with the ABI.  When -mabi=lp64s -
mfpu=64 (such a combination is at least used for the code using FPU in
the Linux kernel) TARGET_HARD_FLOAT still evaluates to true.  Thus "soft
float abi" should be reworded to "target without FPU" instead.

> But movsf also needs to be used in lp64s abi, it can expand to some
> non float instructions.
> Delete TARGET_HARD_FLOAT condition.

IMO this is the correct way to go as GCC Internal says movM must be
defined for any M with a size smaller than or equal to the word size,
thus movsf needs to be always available in LA32.  But it now seems the
condition of movdf should also be changed to TARGET_DOUBLE_FLOAT ||
TARGET_64BIT...

-- 
Xi Ruoyao <[email protected]>

Reply via email to