This is an archive of the discontinued LLVM Phabricator instance.

[COMPILER-RT] Implement __divtf3
ClosedPublic

Authored by koviankevin on Feb 13 2014, 9:49 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

koviankevin updated this revision to Unknown Object (????).Feb 19 2014, 6:13 PM

add test

koviankevin updated this revision to Unknown Object (????).Feb 24 2014, 7:50 PM

Use CRT_HAS_128BIT and modify the codes according to gribozavr's comments

koviankevin updated this revision to Unknown Object (????).Feb 27 2014, 8:43 PM

introduce CRT_LDBL_128BIT

koviankevin updated this revision to Unknown Object (????).Mar 10 2014, 1:13 AM

modify by gribozavr's comment and use COMPILER_RT_ABI

koviankevin updated this revision to Diff 9735.May 23 2014, 1:08 AM

use UINT64_C and drop le64

joerg added a subscriber: joerg.May 28 2014, 7:21 PM
joerg added inline comments.
lib/builtins/divtf3.c
82 ↗(On Diff #9735)

Do we really need the full 64bit constant here?

koviankevin added inline comments.May 28 2014, 7:52 PM
lib/builtins/divtf3.c
82 ↗(On Diff #9735)

Yes, we need the upper 64-bit of recip64 * q63b
If we use 32-bit constant only, the carry may be dropped, and the result will be incorrect

joerg closed this revision.May 30 2014, 4:16 AM
joerg updated this revision to Diff 9956.

Closed by commit rL209886 (authored by @joerg).

joerg added a comment.May 30 2014, 5:03 AM

Please drop me a patch for CREDITS.TXT BTW.

lib/builtins/divtf3.c
82 ↗(On Diff #9735)

Sure, I mean: isn't it enough to use the highest 8bit of the constant? recip64 is only accurate to 3.5bit anyway (see comment), so anything more shouldn't matter?

Sorry for leaving this hanging so long.
I just refered the double-pecision version(i.e, divdf3) to write this function
Since it used 32-bit instead of the highest 8-bit in divdf3, I used 64-bit constant here.