bjorn3 commented on Issue #1179:
Is this fixed with the new x64 backend?
abrown commented on Issue #1179:
This is very specific to the old backend, I vote we close it.
abrown closed Issue #1179:
It looks like our SIMD encodings waver between permitting and not permitting the REX prefix: compare uses of
enc_32_64
andenc_both
in x86/encoding.rs.As a result, vector operations using
r8
-r15
as parts of a memory operand, orxmm8
-xmm15
as a register operand, get rejected when searching for encodings and, I believe, result in Cranelift not using those xmm registers entirely in some circumstances (we're missing a rex-friendlyMOVUPS
encoding so I don't think we can encode a spill ofxmm8
-xmm15
).I ran across this trying to emit
movups xmm7, [r11]
when restoring SIMD registers in Windows prologues. This currently results in a constraint violation panic when compiling. I believe this is because I specified the location after inserting the instruction, so Cranelift picked theFPR8
/GPR8
-constrained encoding, and I just gave it an impossible operand, whereas regalloc would have been unable to user11
as an operand and forced shuffling until a fitting register were available.I'm pretty sure we can make the blanket change from
enc_32_64
toenc_both
for the region I linked above. However, I don't know themaybe_isap
variants, and I figure it'd be better to confirm this before changing stuff around.cc @abrown and @bnjbvr as people who've recently touched these things, I think?
Last updated: Nov 22 2024 at 17:03 UTC