This is an archive of the discontinued LLVM Phabricator instance.

FreeBSD: enable __float128 on x86 and powerpc64le
Needs ReviewPublic

Authored by brooks on Oct 4 2022, 9:04 AM.

Details

Summary

This is a prerequisite for proper runtime support on FreeBSD as it will
allow such a runtime to be compiled.

Diff Detail

Event Timeline

brooks created this revision.Oct 4 2022, 9:04 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 4 2022, 9:04 AM
Herald added a subscriber: krytarowski. · View Herald Transcript
brooks requested review of this revision.Oct 4 2022, 9:04 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 4 2022, 9:04 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
dim accepted this revision.Oct 4 2022, 9:12 AM

LGTM

This revision is now accepted and ready to land.Oct 4 2022, 9:12 AM
arichardson accepted this revision.Oct 4 2022, 9:20 AM

Could you add a RUN: line to `clang/test/CodeGenCXX/float128-declarations.cpp? Code LGTM.

// RUN: %clang_cc1 -no-opaque-pointers -emit-llvm -triple x86_64-unknown-freebsd -std=c++11 \
// RUN:   %s -o - | FileCheck %s -check-prefix=CHECK-X86
emaste accepted this revision.Oct 4 2022, 10:13 AM

OK. I think the switch will become unwieldy if additional arch-dependent things are added but could be dealt with then.

brooks updated this revision to Diff 465223.Oct 4 2022, 4:49 PM

Add a test as requested by @arichardson

arichardson accepted this revision.Oct 5 2022, 12:58 AM

@brooks do you want me to commit this for you or do you have commit access?

@arichardson please commit. I do not have commit access. Thanks

pkubaj requested changes to this revision.EditedDec 22 2022, 6:47 PM
pkubaj added a subscriber: pkubaj.

Could you modify it appropriately to also enable ppc, ppc64 and ppc64le? I checked whether it works on FreeBSD 13.1-RELEASE and it builds and works fine.

EDIT: or better just go for now with ppc64le, since enabling for older variants should probably be done depending on the hardware.

This revision now requires changes to proceed.Dec 22 2022, 6:47 PM
brooks updated this revision to Diff 509934.Mar 31 2023, 12:56 AM
  • Rebase
  • Add powerpc64le
brooks retitled this revision from FreeBSD: enable __float128 on x86 to FreeBSD: enable __float128 on x86 and powerpc64le.Mar 31 2023, 12:57 AM
dim accepted this revision.Mar 31 2023, 1:37 AM

LGTM again :)

nemanjai accepted this revision.Mar 31 2023, 2:21 AM

My comments are minor nits that don't require another review, so LGTM.

clang/lib/Basic/Targets/OSTargets.h
245–250

Seems a bit odd to have a separate switch on the same value for __float128 rather than using fallthrough.

clang/test/CodeGenCXX/float128-declarations.cpp
5–6

Now that you added ppc64le, did you mean to also add a line with that triple without the explicit -target-feature?

emaste added a comment.Sep 5 2023, 4:31 PM

Looks like this still needs someone to push it -- @brooks if you rebase and send to GitHub I cna pick it up

brad added a subscriber: brad.Sun, Nov 19, 12:27 AM

You can close this.

You can close this.

The submitted patch https://github.com/llvm/llvm-project/commit/23c47eba879769a29772c999be2991201c2fe399 was not the same since it omitted ppc64. So I guess this should remain open