PR target/115752
gcc/ChangeLog:
* config/loongarch/loongarch.cc
(loongarch_hard_regno_mode_ok_uncached): Replace
UNITS_PER_FPVALUE with UNITS_PER_HWFPVALUE.
* config/loongarch/loongarch.h (UNITS_PER_FPVALUE): Delete.
gcc/testsuite/ChangeLog:
* gcc.target/loongarch/pr115752.c: New test.
if (mclass == MODE_FLOAT
|| mclass == MODE_COMPLEX_FLOAT
|| mclass == MODE_VECTOR_FLOAT)
- return size <= UNITS_PER_FPVALUE;
+ return size <= UNITS_PER_HWFPVALUE;
/* Allow integer modes that fit into a single register. We need
to put integers into FPRs when using instructions like CVT
#define UNITS_PER_HWFPVALUE \
(TARGET_SOFT_FLOAT ? 0 : UNITS_PER_FP_REG)
-/* The largest size of value that can be held in floating-point
- registers. */
-#define UNITS_PER_FPVALUE \
- (TARGET_SOFT_FLOAT ? 0 \
- : TARGET_SINGLE_FLOAT ? UNITS_PER_FP_REG \
- : LA_LONG_DOUBLE_TYPE_SIZE / BITS_PER_UNIT)
-
/* The number of bytes in a double. */
#define UNITS_PER_DOUBLE (TYPE_PRECISION (double_type_node) / BITS_PER_UNIT)
--- /dev/null
+/* { dg-do compile } */
+
+long double
+test (long double xx)
+{
+ __asm ("" :: "f"(xx)); /* { dg-error "inconsistent operand constraints in an 'asm'" } */
+ return xx + 1;
+}