Page MenuHomePhabricator

[compiler-rt][builtins][PowerPC] Add __fixtfti builtin on PowerPC

Authored by bsaleil on Nov 1 2019, 12:28 PM.



This patch implements __fixtfti builtin for PowerPC.
This builtin converts a long double (IBM double-double) to a signed int128.

The conversion relies on the unsigned conversion of the absolute value of the long double.

The patch also includes tests for this builtin using both positive and negative long doubles.

Diff Detail

Event Timeline

bsaleil created this revision.Nov 1 2019, 12:28 PM
bsaleil updated this revision to Diff 228121.Nov 6 2019, 12:12 PM

Improved test case by testing conversion of the biggest negative int128.

kamaub added a subscriber: kamaub.Nov 14 2019, 12:12 PM

This LGTM, please unify the comment styles.


Same here, mismatched comment styles.


Very minor nit: could you change this comment style to match the rest of the file (/**/ vs //).

bsaleil updated this revision to Diff 229845.Nov 18 2019, 7:40 AM

Make comment style uniform

bsaleil marked 2 inline comments as done.Nov 18 2019, 7:41 AM

Fixed comment style mismatch

nemanjai accepted this revision.Nov 21 2019, 4:06 AM

LGTM. Thank you.

@echristo FYI

This revision is now accepted and ready to land.Nov 21 2019, 4:06 AM
jgorbe added a subscriber: jgorbe.Nov 22 2019, 3:50 PM
amyk accepted this revision.Nov 23 2019, 8:38 PM

This also LGTM.

This revision was automatically updated to reflect the committed changes.
thakis added inline comments.

mind keeping this alphabetized?