Skip to content

Commit 92b1706

Browse files
authored
asm: follow up on DSL nits (#10946)
Some final review comments went unaddressed in #10855 that this change resolve, primarily using `LIG` for non-vector definitions. I was going to add `.wig()` everywhere but, after thinking about it, it _is_ the default value for `vex()` and leaving it out reduces the amount of information one has to parse. This also cleans up a few extra lines I saw lying around.
1 parent ac7729d commit 92b1706

3 files changed

Lines changed: 5 additions & 8 deletions

File tree

cranelift/assembler-x64/meta/src/instructions/avg.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,5 @@ pub fn list() -> Vec<Inst> {
1010
// AVX versions
1111
inst("vpavgb", fmt("B", [w(xmm1), r(xmm2), r(xmm_m128)]), vex(L128)._66()._0f().op(0xE0), _64b | compat | avx),
1212
inst("vpavgw", fmt("B", [w(xmm1), r(xmm2), r(xmm_m128)]), vex(L128)._66()._0f().op(0xE3), _64b | compat | avx),
13-
14-
1513
]
1614
}

cranelift/assembler-x64/meta/src/instructions/div.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
use crate::dsl::{Feature::*, Inst, Location::*, VexLength::*, align};
2-
use crate::dsl::{fmt, implicit, inst, r, rex, rw, vex};
1+
use crate::dsl::{Feature::*, Inst, Location::*, VexLength::*};
2+
use crate::dsl::{align, fmt, implicit, inst, r, rex, rw, vex};
33

44
#[rustfmt::skip] // Keeps instructions on a single line.
55
pub fn list() -> Vec<Inst> {
@@ -19,7 +19,7 @@ pub fn list() -> Vec<Inst> {
1919
inst("divsd", fmt("A", [rw(xmm1), r(xmm_m64)]), rex([0xF2, 0xF, 0x5E]).r(), _64b | compat | sse2),
2020
inst("vdivps", fmt("B", [rw(xmm1), r(xmm2), r(xmm_m128)]), vex(L128)._0f().op(0x5E).r(), _64b | compat | avx),
2121
inst("vdivpd", fmt("B", [rw(xmm1), r(xmm2), r(xmm_m128)]), vex(L128)._66()._0f().op(0x5E).r(), _64b | compat | avx),
22-
inst("vdivss", fmt("B", [rw(xmm1), r(xmm2), r(xmm_m32)]), vex(L128)._f3()._0f().op(0x5E).r(), _64b | compat | avx),
23-
inst("vdivsd", fmt("B", [rw(xmm1), r(xmm2), r(xmm_m64)]), vex(L128)._f2()._0f().op(0x5E).r(), _64b | compat | avx),
22+
inst("vdivss", fmt("B", [rw(xmm1), r(xmm2), r(xmm_m32)]), vex(LIG)._f3()._0f().op(0x5E).r(), _64b | compat | avx),
23+
inst("vdivsd", fmt("B", [rw(xmm1), r(xmm2), r(xmm_m64)]), vex(LIG)._f2()._0f().op(0x5E).r(), _64b | compat | avx),
2424
]
2525
}

cranelift/assembler-x64/meta/src/instructions/round.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,5 @@ pub fn list() -> Vec<Inst> {
1414
inst("vroundps", fmt("RMI", [w(xmm1), r(xmm_m128), r(imm8)]), vex(L128)._66()._0f3a().ib().op(0x08), _64b | compat | avx),
1515
inst("vroundsd", fmt("RVMI", [w(xmm1), r(xmm2), r(xmm_m64), r(imm8)]), vex(LIG)._66()._0f3a().ib().op(0x0b), _64b | compat | avx),
1616
inst("vroundss", fmt("RVMI", [w(xmm1), r(xmm2), r(xmm_m32), r(imm8)]), vex(LIG)._66()._0f3a().ib().op(0x0a), _64b | compat | avx),
17-
18-
]
17+
]
1918
}

0 commit comments

Comments
 (0)