mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-08 21:32:39 +00:00
Last COPY conversion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108387 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
273ff31e13
commit
6881898eb5
@ -1279,12 +1279,11 @@ bool X86FastISel::X86SelectTrunc(const Instruction *I) {
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
// First issue a copy to GR16_ABCD or GR32_ABCD.
|
// First issue a copy to GR16_ABCD or GR32_ABCD.
|
||||||
unsigned CopyOpc = (SrcVT == MVT::i16) ? X86::MOV16rr : X86::MOV32rr;
|
|
||||||
const TargetRegisterClass *CopyRC = (SrcVT == MVT::i16)
|
const TargetRegisterClass *CopyRC = (SrcVT == MVT::i16)
|
||||||
? X86::GR16_ABCDRegisterClass : X86::GR32_ABCDRegisterClass;
|
? X86::GR16_ABCDRegisterClass : X86::GR32_ABCDRegisterClass;
|
||||||
unsigned CopyReg = createResultReg(CopyRC);
|
unsigned CopyReg = createResultReg(CopyRC);
|
||||||
BuildMI(*FuncInfo.MBB, FuncInfo.InsertPt, DL, TII.get(CopyOpc), CopyReg)
|
BuildMI(*FuncInfo.MBB, FuncInfo.InsertPt, DL, TII.get(TargetOpcode::COPY),
|
||||||
.addReg(InputReg);
|
CopyReg).addReg(InputReg);
|
||||||
|
|
||||||
// Then issue an extract_subreg.
|
// Then issue an extract_subreg.
|
||||||
unsigned ResultReg = FastEmitInst_extractsubreg(MVT::i8,
|
unsigned ResultReg = FastEmitInst_extractsubreg(MVT::i8,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user