or1k: Add builtin define to detect hard float
authorStafford Horne <shorne@gmail.com>
Fri, 24 Jan 2020 12:31:00 +0000 (21:31 +0900)
committerStafford Horne <shorne@gmail.com>
Wed, 13 Jan 2021 23:45:00 +0000 (08:45 +0900)
This is used in libgcc and now glibc to detect when hardware floating
point operations are supported by the target.

gcc/ChangeLog:

* config/or1k/or1k.h (TARGET_CPU_CPP_BUILTINS): Add builtin
  define for __or1k_hard_float__.

gcc/config/or1k/or1k.h

index dc579e4a388ab5dc5c0fd4be0fe90a8ed9ee168c..b686f1bd159e88cede1c97ac2ecd5f9e5a1b1d52 100644 (file)
@@ -30,6 +30,8 @@
       builtin_define ("__or1k__");             \
       if (TARGET_CMOV)                         \
        builtin_define ("__or1k_cmov__");       \
+      if (TARGET_HARD_FLOAT)                   \
+       builtin_define ("__or1k_hard_float__"); \
       builtin_assert ("cpu=or1k");             \
       builtin_assert ("machine=or1k");         \
     }                                          \