r353656 - long double is double on OpenBSD/NetBSD/PPC.

Hans Wennborg via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 12 03:18:52 PST 2019


Merged to 8.0 in r353831.

On Mon, Feb 11, 2019 at 3:52 AM Brad Smith via cfe-commits
<cfe-commits at lists.llvm.org> wrote:
>
> Author: brad
> Date: Sun Feb 10 18:53:16 2019
> New Revision: 353656
>
> URL: http://llvm.org/viewvc/llvm-project?rev=353656&view=rev
> Log:
> long double is double on OpenBSD/NetBSD/PPC.
>
> Patch by George Koehler.
>
> Modified:
>     cfe/trunk/lib/Basic/Targets/PPC.h
>     cfe/trunk/test/CodeGen/powerpc_types.c
>
> Modified: cfe/trunk/lib/Basic/Targets/PPC.h
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Targets/PPC.h?rev=353656&r1=353655&r2=353656&view=diff
> ==============================================================================
> --- cfe/trunk/lib/Basic/Targets/PPC.h (original)
> +++ cfe/trunk/lib/Basic/Targets/PPC.h Sun Feb 10 18:53:16 2019
> @@ -330,9 +330,15 @@ public:
>        break;
>      }
>
> -    if (getTriple().isOSFreeBSD()) {
> +    switch (getTriple().getOS()) {
> +    case llvm::Triple::FreeBSD:
> +    case llvm::Triple::NetBSD:
> +    case llvm::Triple::OpenBSD:
>        LongDoubleWidth = LongDoubleAlign = 64;
>        LongDoubleFormat = &llvm::APFloat::IEEEdouble();
> +      break;
> +    default:
> +      break;
>      }
>
>      // PPC32 supports atomics up to 4 bytes.
>
> Modified: cfe/trunk/test/CodeGen/powerpc_types.c
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/powerpc_types.c?rev=353656&r1=353655&r2=353656&view=diff
> ==============================================================================
> --- cfe/trunk/test/CodeGen/powerpc_types.c (original)
> +++ cfe/trunk/test/CodeGen/powerpc_types.c Sun Feb 10 18:53:16 2019
> @@ -1,4 +1,6 @@
>  // RUN: %clang_cc1 -triple powerpc-unknown-freebsd -emit-llvm -o - %s| FileCheck -check-prefix=SVR4-CHECK %s
> +// RUN: %clang_cc1 -triple powerpc-unknown-netbsd -emit-llvm -o - %s| FileCheck -check-prefix=SVR4-CHECK %s
> +// RUN: %clang_cc1 -triple powerpc-unknown-openbsd -emit-llvm -o - %s| FileCheck -check-prefix=SVR4-CHECK %s
>
>  #include <stdarg.h>
>
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


More information about the cfe-commits mailing list