HaxeFoundation / HaxeFoundation/haxe

Unit test on high bit shifts

Open
#10,752 3 comments 0 reactions 1 assignee Claimed by @Simn View on GitHub
platform-eval
Dominant language
Haxe
Stars
6.9k
Forks
715
Avg merge
2d 2h
Merged PRs (30d)
11

Description

The following tests might give different results depending on platforms:

```haxe
function shl( x, y ) return x << y;
shl(1,33); // can be 0 or 2, depending if native CPU opcode is used (which does &31 on shift value)
```

https://c9x.me/x86/html/file_module_x86_id_285.html

I think we should make it platform agnostic, but I'm curious to know if the issue is HL specific or if some other platforms are affected.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.