X86: change MOV64ri64i32 into MOV32ri64
authorTim Northover <tnorthover@apple.com>
Sat, 1 Jun 2013 09:55:14 +0000 (09:55 +0000)
committerTim Northover <tnorthover@apple.com>
Sat, 1 Jun 2013 09:55:14 +0000 (09:55 +0000)
commit85c622d6b6633c19d2729e82453c6c7f56ee7cd9
tree7926a5dac9bd3ca0f95366bf9e0f7aea89a84253
parent72ad17c48c15562fe31c65f6daa09c83f42860c1
X86: change MOV64ri64i32 into MOV32ri64

The MOV64ri64i32 instruction required hacky MCInst lowering because it
was allocated as setting a GR64, but the eventual instruction ("movl")
only set a GR32. This converts it into a so-called "MOV32ri64" which
still accepts a (appropriate) 64-bit immediate but defines a GR32.
This is then converted to the full GR64 by a SUBREG_TO_REG operation,
thus keeping everyone happy.

This fixes a typo in the opcode field of the original patch, which
should make the legact JIT work again (& adds test for that problem).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183068 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86CodeEmitter.cpp
lib/Target/X86/X86ISelDAGToDAG.cpp
lib/Target/X86/X86InstrCompiler.td
lib/Target/X86/X86MCInstLower.cpp
test/CodeGen/X86/abi-isel.ll
test/ExecutionEngine/mov64zext32.ll [new file with mode: 0644]