Skip to content

Use Int128 and UInt128 literals for compiler_rt specs#11944

Draft
lbguilherme wants to merge 2 commits intocrystal-lang:masterfrom
lbguilherme:feat/remove-make_ti-make_tu
Draft

Use Int128 and UInt128 literals for compiler_rt specs#11944
lbguilherme wants to merge 2 commits intocrystal-lang:masterfrom
lbguilherme:feat/remove-make_ti-make_tu

Conversation

@lbguilherme
Copy link
Contributor

This fixes a TODO to remove make_ti and make_tu once 128-bit literals are supported.

@HertzDevil
Copy link
Contributor

I don't think anything in the standard library can use 128-bit literals as long as we have CI using 1.0.0 as the base compiler.

@straight-shoota
Copy link
Member

straight-shoota commented Mar 28, 2022

This is similar to #5545 which we can't merge unless ensuring compatibility with Crystal 1.0 (see #5545 (comment)).
Since this is only about compiler_rt specs, I suppose we could just skip these specs for older Crystal versions and still merge it.

@lbguilherme
Copy link
Contributor Author

As these are only spec changes, I thought this wasn't an issue. But this PR can sit waiting for a while I guess, I see multiple CI failures.

test__divti3(make_ti(-9223372036854775808, 0x0), -1, make_ti(-9223372036854775808, 0x0))
test__divti3(make_ti(-9223372036854775808, 0x0), -2, make_ti(0x4000000000000000, 0x0))
test__divti3(make_ti(-9223372036854775808, 0x0), 2, make_ti(-0x4000000000000000, 0x0))
test__divti3(0x80000000000000000000000000000000_u128.to_i128!, 1, 0x80000000000000000000000000000000_u128.to_i128!)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why 0x80000000000000000000000000000000_u128.to_i128! and not -0x80000000000000000000000000000000_i128

@straight-shoota straight-shoota added this to the 2.0.0 milestone May 30, 2022
@straight-shoota straight-shoota marked this pull request as draft May 30, 2022 21:15
@straight-shoota
Copy link
Member

Marking as draft because we probably won't merge this in the near future (see #5545 (comment)).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants