Skip to content
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

asm: introduce a new x64 assembler #10110

Merged
merged 28 commits into from
Feb 4, 2025
Merged
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
de34824
asm: add initial infrastructure for an external assembler
abrown Nov 7, 2024
9e74026
asm: bless Cranelift file tests
abrown Jan 24, 2025
872c420
ci: skip formatting when `rustfmt` not present
abrown Jan 24, 2025
0268ef9
vet: audit `arbtest` for use as a dev-dependency
abrown Jan 25, 2025
f6e4f1d
ci: make assembler crates publishable
abrown Jan 25, 2025
594a3ca
review: use Cargo workspace values
abrown Jan 31, 2025
c3e28c4
review: document `Inst`, move `Inst::name`
abrown Jan 31, 2025
ff778af
review: clarify 'earlier' doc comment
abrown Jan 31, 2025
043f501
review: document multi-byte opcodes
abrown Jan 31, 2025
1fd0e1d
review: document `Rex` builder methods
abrown Jan 31, 2025
04aeb44
review: document encoding rules
abrown Jan 31, 2025
6084920
review: clarify 'bits' -> 'width'
abrown Jan 31, 2025
fab310a
review: clarify confusing legacy prefixes
abrown Jan 31, 2025
7811d40
review: tweak IA-32e language
abrown Jan 31, 2025
d782bb8
review: expand documentation for format
abrown Jan 31, 2025
2072817
review: move feature list closer to enum
abrown Jan 31, 2025
b460c77
review: add a TODO to remove AT&T operand ordering
abrown Jan 31, 2025
f03fccf
review: move prefix emission to separate lines
abrown Jan 31, 2025
10db196
review: add testing note
abrown Jan 31, 2025
1a5cffe
review: fix incomplete sentence
abrown Jan 31, 2025
d228460
review: rename `MinusRsp` to `NonRspGpr`
abrown Jan 31, 2025
1427b69
review: add TODO for commented out instructions
abrown Jan 31, 2025
c6147c6
review: add conservative down-conversion to `is_imm*`
abrown Jan 31, 2025
57a9991
Fuzzing updates for cranelift-assembler-x64 (#10)
alexcrichton Jan 31, 2025
6935335
vet: skip audit for `cranelift-assembler-x64-fuzz`
abrown Feb 1, 2025
2c8a276
review: use 32-bit form for 8-bit and 16-bit reg-reg
abrown Feb 3, 2025
39a3aa7
fix: skip `rustfmt` on generated code in more cases
abrown Feb 3, 2025
6707cb1
fix: feed Cargo the meta crate version
abrown Feb 3, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
review: document encoding rules
abrown committed Jan 31, 2025
commit 04aeb44bf0018178353ee945c1d3d0f1211f459f
3 changes: 3 additions & 0 deletions cranelift/assembler-x64/meta/src/dsl/encoding.rs
Original file line number Diff line number Diff line change
@@ -184,6 +184,9 @@ impl Rex {
Self { imm: Imm::io, ..self }
}

/// Check a subset of the rules for valid encodings outlined in chapter 2,
/// _Instruction Format_, of the Intel® 64 and IA-32 Architectures Software
/// Developer’s Manual, Volume 2A.
fn validate(&self, operands: &[Operand]) {
assert!(self.digit < 8);
assert!(!(self.r && self.digit > 0));