Zvame: add elementwise compares, SFU estimates, and M→Acc move#1
Open
pengwubj wants to merge 1 commit into
Open
Zvame: add elementwise compares, SFU estimates, and M→Acc move#1pengwubj wants to merge 1 commit into
pengwubj wants to merge 1 commit into
Conversation
Adds (rebased onto the .ew refactor, opcode 0101011): - mcmpeq.ew / mcmpne.ew (elementwise == / != compares) - mrec.ew / msqrt.ew / mrsqrt.ew / mtanh.ew (SFU estimates, new "Special Functions" group) - mmov.m.a (M register -> accumulator move; mirror of mmov.a.m) and the corresponding AmeOperation enum members (CMPEQ1D..TANH1D). funct7 36-42 (previously free). The redundant mul/FMA instructions from the earlier draft were dropped in favor of upstream mmul.ew/mmulacc.ew/etc. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Adds 7 instructions to the Attached Matrix Extension (Zvame), rebased onto the recent
.ewrefactor (opcode0101011):Compare and Predication
mcmpeq.ew— elementwise equality (IEEE 754-2008 OEQ; NaN → false)mcmpne.ew— elementwise inequality (IEEE 754-2008 UNE; logical complement ofmcmpeq.ew)Special Functions (new group)
mrec.ew— reciprocal estimatemsqrt.ew— square-root estimatemrsqrt.ew— reciprocal-square-root estimatemtanh.ew— hyperbolic-tangent estimateState Management
mmov.m.a— move M register group → accumulator (mirror ofmmov.a.m)Encodings use opcode
0101011, funct7 36–42 (previously free); verified no encoding conflicts across the extension. Adds the correspondingAmeOperationenum members (CMPEQ1D..TANH1D).Notes:
ame_opcompute branches for the new ops are not yet implemented (consistent with existing draft ops likeEXP21D);operation()bodies follow themadd.ew/mexp2.ew/mmov.a.mpatterns.🤖 Generated with Claude Code