-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cranelift: Add
f16const
and f128const
instructions
- Loading branch information
Showing
16 changed files
with
249 additions
and
14 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
test interpret | ||
|
||
|
||
;; These values are special for RISC-V since it has a dedicated | ||
;; instruction to generate them. | ||
|
||
function %special_f128_values() -> f128, f128, f128, f128, f128, f128, f128, f128, f128, f128, f128, f128, f128, f128, f128, f128, f128, f128, f128, f128, f128, f128, f128, f128, f128, f128, f128, f128, f128, f128, f128, f128 { | ||
block0: | ||
v0 = f128const -0x1.p0 | ||
v1 = f128const 0x1.p-16382 | ||
v2 = f128const 0x1.p-16 | ||
v3 = f128const 0x1.p-15 | ||
v4 = f128const 0x1.p-8 | ||
v5 = f128const 0x1.p-7 | ||
v6 = f128const 0x1.p-4 | ||
v7 = f128const 0x1.p-3 | ||
v8 = f128const 0x1.p-2 | ||
v9 = f128const 0x1.4p-2 | ||
v10 = f128const 0x1.8p-2 | ||
v11 = f128const 0x1.cp-2 | ||
v12 = f128const 0x1.p-1 | ||
v13 = f128const 0x1.4p-1 | ||
v14 = f128const 0x1.8p-1 | ||
v15 = f128const 0x1.cp-1 | ||
v16 = f128const 0x1.p0 | ||
v17 = f128const 0x1.4p0 | ||
v18 = f128const 0x1.8p0 | ||
v19 = f128const 0x1.cp0 | ||
v20 = f128const 0x1.p1 | ||
v21 = f128const 0x1.4p1 | ||
v22 = f128const 0x1.8p1 | ||
v23 = f128const 0x1.p2 | ||
v24 = f128const 0x1.p3 | ||
v25 = f128const 0x1.p4 | ||
v26 = f128const 0x1.p7 | ||
v27 = f128const 0x1.p8 | ||
v28 = f128const 0x1.p15 | ||
v29 = f128const 0x1.p16 | ||
v30 = f128const +Inf | ||
v31 = f128const +NaN | ||
|
||
return v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31 | ||
} | ||
|
||
; run: %special_f128_values() == [-0x1.p0, 0x1.p-16382, 0x1.p-16, 0x1.p-15, 0x1.p-8, 0x1.p-7, 0x1.p-4, 0x1.p-3, 0x1.p-2, 0x1.4p-2, 0x1.8p-2, 0x1.cp-2, 0x1.p-1, 0x1.4p-1, 0x1.8p-1, 0x1.cp-1, 0x1.p0, 0x1.4p0, 0x1.8p0, 0x1.cp0, 0x1.p1, 0x1.4p1, 0x1.8p1, 0x1.p2, 0x1.p3, 0x1.p4, 0x1.p7, 0x1.p8, 0x1.p15, 0x1.p16, +Inf, +NaN] | ||
|
||
function %f128const_neg_nan() -> f128 { | ||
block0: | ||
v0 = f128const -NaN | ||
return v0 | ||
} | ||
|
||
; run: %f128const_neg_nan() == -NaN |
Oops, something went wrong.