Repository navigation
Translator: s_flbit_i32_b64 and s_flbit_i32_i64 - #733
Merged
Merged
Conversation
Both raised Unsupported. b64 counts the 0 bits above the top 1 of the 64-bit S0; i64 does the same for ~S0 when S0 is negative (the bits before the first one that differs from the sign); -1 when there is none. SCC is not written. Built from FindUMsb of each half. The pair is 64-bit data, as for s_lshl_b64; a lane-mask source stays Unsupported (ItsNotRexed#210). tests/semantic/test_salu_flbit_64.py checks both against a plain-Python reference.
main pins 48557ea again since the ItsNotRexed#666-ItsNotRexed#698 merge round, while tools/rpf9dump/Program.cs (3816356) already uses ArchiveEntry.ResourceDrawableOffset from 917e9b9, so the Windows 'check' job fails to compile rpf9dump on every PR. Same one-line change as ItsNotRexed#713 / ItsNotRexed#732; whichever lands first, this merges cleanly.
Contributor
Author
|
CI note: the Windows |
Open
2 tasks done
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
tools/rdna2spirv.pyraisesUnsupportedons_flbit_i32_b64ands_flbit_i32_i64, the 64-bit leading-bit counts. They aren't in the translated corpus, so this is future-proofing. Claimed in #374.Change
tools/rdna2spirv.py: both count from bit 63 down. SCC is not written.s_flbit_i32_b64counts the 0 bits before the first 1:31 − FindUMsb(hi)when the high half isn't 0, else63 − FindUMsb(lo), and −1 when S0 is 0.s_flbit_i32_i64counts the bits before the first one that differs from the sign bit, likev_ffbh_i32/s_flbit_i32in 64 bits. It's the b64 count of~S0when S0 is negative, and −1 for 0 and −1.s_lshl_b64. A source thatlane_masks.pymarks as a lane mask staysUnsupported(Translator: wave64 lane masks used as integers read back as per-lane bools; wave64 inferred from mnemonics #210). S0 can also be a 64-bit inline constant.tests/semantic/test_salu_flbit_64.py(new, stdlibunittest) checks against a plain-Python reference:execrejectedexpas 16-bit halves ORed into0x40000000, so no export channel can be a NaN pattern.Tested
python -I -m unittest discover -s tests/semantic: all pass. Without the translator change, the new file has errors (Unsupported).python -m compileall -q tools testspasses. Not run on a GPU, and no game files used.AI-assisted (Claude Code): it wrote the change and the tests, and ran the checks listed above.