x64: Refactor and fill out some gpr-vs-xmm bits (#6058)
* x64: Add instruction helpers for `mov{d,q}`
These will soon grow AVX-equivalents so move them to instruction helpers
to have clauses for AVX in the future.
* x64: Don't auto-convert between RegMemImm and XmmMemImm
The previous conversion, `mov_rmi_to_xmm`, would move from GPR registers
to XMM registers which isn't what many of the other `convert` statements
between these newtypes do. This seemed like a possible footgun so I've
removed the auto-conversion and added an explicit helper to go from a
`u32` to an `XmmMemImm`.
* x64: Add AVX encodings of some more GPR-related insns
This commit adds some more support for AVX instructions where GPRs are
in use mixed in with XMM registers. This required a few more variants of
`Inst` to handle the new instructions.
* Fix vpmovmskb encoding
* Fix xmm-to-gpr encoding of vmovd/vmovq
* Fix typo
* Fix rebase conflict
* Fix rebase conflict with tests
This commit is contained in:
@@ -1715,7 +1715,14 @@ impl AvxOpcode {
|
||||
| AvxOpcode::Vpextrq
|
||||
| AvxOpcode::Vpblendw
|
||||
| AvxOpcode::Vmovddup
|
||||
| AvxOpcode::Vbroadcastss => {
|
||||
| AvxOpcode::Vbroadcastss
|
||||
| AvxOpcode::Vmovd
|
||||
| AvxOpcode::Vmovq
|
||||
| AvxOpcode::Vmovmskps
|
||||
| AvxOpcode::Vmovmskpd
|
||||
| AvxOpcode::Vpmovmskb
|
||||
| AvxOpcode::Vcvtsi2ss
|
||||
| AvxOpcode::Vcvtsi2sd => {
|
||||
smallvec![InstructionSet::AVX]
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user