This is an archive of the discontinued LLVM Phabricator instance.

Incorrect operand sizes for some MMX instructions: punpcklwd, punpcklbw and punpckldq
ClosedPublic

Authored by avt77 on Dec 27 2017, 6:05 AM.

Details

Summary

It's a fix for Bug 33838 - Incorrect operand sizes for MMX instructions: I changed the description of the instrs in td file. When I was working with this issue I seriously changed the debug logging for asm-matcher but I decided to introduce those changes in a separate patch which will be published soon.

Diff Detail

Repository
rL LLVM

Event Timeline

avt77 created this revision.Dec 27 2017, 6:05 AM
craig.topper added inline comments.Dec 27 2017, 3:02 PM
lib/Target/X86/X86InstrMMX.td
112 ↗(On Diff #128227)

Can we add a X86MemOperand parameter to MMXI_binop_rm_int that defaults to i64mem. Then just make MMXI_binop_rm32_int inherit from MMXI_binop_rm_int and pass the i32mem to that parameter.

craig.topper added inline comments.Dec 27 2017, 3:08 PM
test/MC/X86/punpack-intel.s
1 ↗(On Diff #128227)

Just add these to intel-syntax.s and intel-syntax-error.s I don't think its worth a new test file.

avt77 updated this revision to Diff 128298.Dec 28 2017, 8:24 AM

I changed the implementation accodingly Craig's requiremetns: now it's shorter and more effective.

Please remember to prefix phab subjects, in this case "[X86][MMX]" - and tag it with PR33838 as well:

"[X86][MMX] Incorrect operand sizes for some MMX instructions: punpcklwd, punpcklbw and punpckldq (PR33838)"

Repeat on the commit message as well - it makes email filtering a lot easier - cheers!

This revision is now accepted and ready to land.Dec 28 2017, 8:57 AM
This revision was automatically updated to reflect the committed changes.