-
Notifications
You must be signed in to change notification settings - Fork 99
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CIR] Add support for long double type (#536)
This PR adds support for the `long double` type in C/C++. It includes a new CIR type `!cir.long_double` to represent the `long double` type. CIRGen and LLVMIR lowering support for the new type is also added. Since the underlying floating point format used by a `long double` value is implementation-defined, the `!cir.long_double` type is parameterized to include information about the underlying floating point format. Specifically, a `long double` value may have one of the following formats: 1) IEEE-754 binary64 format (i.e. the same format used by `double`); 2) x87 80-bit floating point format; 3) IEEE-754 binary128 format; 4) PowerPC double double format. This PR invents 3 more CIR types to represent the above floating-point formats, and `!cir.long_double` is parameterized by another CIR floating-point type which represents its underlying format: - `!cir.long_double<!cir.double>` represents the 1st variant above; - `!cir.long_double<!cir.f80>` represents the 2nd variant above; - `!cir.long_double<!cir.f128>` represents the 3rd variant above; - `!cir.long_double<!cir.ppc_doubledouble>` represents the 4th variant above. Co-authored-by: Bruno Cardoso Lopes <bcardosolopes@users.noreply.github.com>
- Loading branch information
1 parent
aa6e197
commit 4a2955e
Showing
11 changed files
with
301 additions
and
183 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.