-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
x86 backend is not passing all behavior tests #17645
Labels
arch-x86_64
64-bit x86
backend-self-hosted
bug
Observed behavior contradicts documented or intended behavior
enhancement
Solving this issue will likely involve adding new logic or components to the codebase.
Milestone
Comments
This was referenced Oct 20, 2023
12 tasks
This was referenced Dec 17, 2024
xtexx
added a commit
to xtexx/zig
that referenced
this issue
Jan 18, 2025
xtexx
added a commit
to xtexx/zig
that referenced
this issue
Jan 18, 2025
Simliarly to shl_with_overflow, we first SHL/SAL the integer, then SHR/SAR it back to compare if overflow happens. If overflow happened, set result to the upper limit to make it saturing. Theoretically, if the left shifting instruction is lowered as a single SHL/SAL opcode, and the left operand fits into a register (so no truncation is needed), the CF flag can be used to check for overflow. However the optimization is not implemented right now (for my laziness). Bug: ziglang#17645
xtexx
added a commit
to xtexx/zig
that referenced
this issue
Jan 18, 2025
Simliarly to shl_with_overflow, we first SHL/SAL the integer, then SHR/SAR it back to compare if overflow happens. If overflow happened, set result to the upper limit to make it saturating. Theoretically, if the left shifting instruction is lowered as a single SHL/SAL opcode, and the left operand fits into a register (so no truncation is needed), the CF flag can be used to check for overflow. However the optimization is not implemented right now (for my laziness). Bug: ziglang#17645
xtexx
added a commit
to xtexx/zig
that referenced
this issue
Jan 18, 2025
Simliarly to shl_with_overflow, we first SHL/SAL the integer, then SHR/SAR it back to compare if overflow happens. If overflow happened, set result to the upper limit to make it saturating. Bug: ziglang#17645
xtexx
added a commit
to xtexx/zig
that referenced
this issue
Jan 20, 2025
Simliarly to shl_with_overflow, we first SHL/SAL the integer, then SHR/SAR it back to compare if overflow happens. If overflow happened, set result to the upper limit to make it saturating. Bug: ziglang#17645
xtexx
added a commit
to xtexx/zig
that referenced
this issue
Jan 20, 2025
Simliarly to shl_with_overflow, we first SHL/SAL the integer, then SHR/SAR it back to compare if overflow happens. If overflow happened, set result to the upper limit to make it saturating. Bug: ziglang#17645
xtexx
added a commit
to xtexx/zig
that referenced
this issue
Jan 20, 2025
Simliarly to shl_with_overflow, we first SHL/SAL the integer, then SHR/SAR it back to compare if overflow happens. If overflow happened, set result to the upper limit to make it saturating. Bug: ziglang#17645
xtexx
added a commit
to xtexx/zig
that referenced
this issue
Mar 1, 2025
Simliarly to shl_with_overflow, we first SHL/SAL the integer, then SHR/SAR it back to compare if overflow happens. If overflow happened, set result to the upper limit to make it saturating. Bug: ziglang#17645 Signed-off-by: Bingwu Zhang <[email protected]>
xtexx
added a commit
to xtexx/zig
that referenced
this issue
Mar 1, 2025
Simliarly to shl_with_overflow, we first SHL/SAL the integer, then SHR/SAR it back to compare if overflow happens. If overflow happened, set result to the upper limit to make it saturating. Bug: ziglang#17645 Signed-off-by: Bingwu Zhang <[email protected]>
xtexx
added a commit
to xtexx/zig
that referenced
this issue
Mar 1, 2025
Simliarly to shl_with_overflow, we first SHL/SAL the integer, then SHR/SAR it back to compare if overflow happens. If overflow happened, set result to the upper limit to make it saturating. Bug: ziglang#17645 Signed-off-by: Bingwu Zhang <[email protected]>
xtexx
added a commit
to xtexx/zig
that referenced
this issue
Mar 1, 2025
Simliarly to shl_with_overflow, we first SHL/SAL the integer, then SHR/SAR it back to compare if overflow happens. If overflow happened, set result to the upper limit to make it saturating. Bug: ziglang#17645 Signed-off-by: Bingwu Zhang <[email protected]>
xtexx
added a commit
to xtexx/zig
that referenced
this issue
Mar 2, 2025
Simliarly to shl_with_overflow, we first SHL/SAL the integer, then SHR/SAR it back to compare if overflow happens. If overflow happened, set result to the upper limit to make it saturating. Bug: ziglang#17645 Signed-off-by: Bingwu Zhang <[email protected]>
xtexx
added a commit
to xtexx/zig
that referenced
this issue
Mar 2, 2025
Simliarly to shl_with_overflow, we first SHL/SAL the integer, then SHR/SAR it back to compare if overflow happens. If overflow happened, set result to the upper limit to make it saturating. Bug: ziglang#17645 Co-authored-by: Jacob Young <[email protected]> Signed-off-by: Bingwu Zhang <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
arch-x86_64
64-bit x86
backend-self-hosted
bug
Observed behavior contradicts documented or intended behavior
enhancement
Solving this issue will likely involve adding new logic or components to the codebase.
Current progress relative to the LLVM backend: 1884/1923 (98%)
Once the following list gets small enough, this issue can be closed and separate issues filed for each one.
Related:
The text was updated successfully, but these errors were encountered: