diff options
| author | 2017-01-14 19:55:43 +0000 | |
|---|---|---|
| committer | 2017-01-14 19:55:43 +0000 | |
| commit | bd3306aecb3a15e8967143b8cdbbccf2b1b19b74 (patch) | |
| tree | 309a8132b44564b9e634c0da6815187ce8eab27c /gnu/llvm/lib/Target/Mips/MipsFastISel.cpp | |
| parent | killp -a should not kill the window if only one pane. (diff) | |
| download | wireguard-openbsd-bd3306aecb3a15e8967143b8cdbbccf2b1b19b74.tar.xz wireguard-openbsd-bd3306aecb3a15e8967143b8cdbbccf2b1b19b74.zip | |
Import LLVM 3.9.1 including clang and lld.
Diffstat (limited to 'gnu/llvm/lib/Target/Mips/MipsFastISel.cpp')
| -rw-r--r-- | gnu/llvm/lib/Target/Mips/MipsFastISel.cpp | 32 |
1 files changed, 22 insertions, 10 deletions
diff --git a/gnu/llvm/lib/Target/Mips/MipsFastISel.cpp b/gnu/llvm/lib/Target/Mips/MipsFastISel.cpp index 5e44cd5dc71..19c201d26b2 100644 --- a/gnu/llvm/lib/Target/Mips/MipsFastISel.cpp +++ b/gnu/llvm/lib/Target/Mips/MipsFastISel.cpp @@ -1,5 +1,18 @@ -//===-- MipsastISel.cpp - Mips FastISel implementation -//---------------------===// +//===-- MipsFastISel.cpp - Mips FastISel implementation --------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +/// +/// \file +/// \brief This file defines the MIPS-specific support for the FastISel class. +/// Some of the target-specific code is generated by tablegen in the file +/// MipsGenFastISel.inc, which is #included here. +/// +//===----------------------------------------------------------------------===// #include "MipsCCState.h" #include "MipsInstrInfo.h" @@ -195,7 +208,7 @@ public: bool ISASupported = !Subtarget->hasMips32r6() && !Subtarget->inMicroMipsMode() && Subtarget->hasMips32(); TargetSupported = - ISASupported && (TM.getRelocationModel() == Reloc::PIC_) && + ISASupported && TM.isPositionIndependent() && (static_cast<const MipsTargetMachine &>(TM).getABI().IsO32()); UnsupportedFPMode = Subtarget->isFP64bit(); } @@ -692,11 +705,10 @@ bool MipsFastISel::emitCmp(unsigned ResultReg, const CmpInst *CI) { emitInst(Mips::ADDiu, RegWithOne).addReg(Mips::ZERO).addImm(1); emitInst(Opc).addReg(LeftReg).addReg(RightReg).addReg( Mips::FCC0, RegState::ImplicitDefine); - MachineInstrBuilder MI = emitInst(CondMovOpc, ResultReg) - .addReg(RegWithOne) - .addReg(Mips::FCC0) - .addReg(RegWithZero, RegState::Implicit); - MI->tieOperands(0, 3); + emitInst(CondMovOpc, ResultReg) + .addReg(RegWithOne) + .addReg(Mips::FCC0) + .addReg(RegWithZero); break; } } @@ -944,7 +956,7 @@ bool MipsFastISel::selectFPExt(const Instruction *I) { return false; unsigned SrcReg = - getRegForValue(Src); // his must be a 32 bit floating point register class + getRegForValue(Src); // this must be a 32bit floating point register class // maybe we should handle this differently if (!SrcReg) return false; @@ -1181,7 +1193,7 @@ bool MipsFastISel::processCallArgs(CallLoweringInfo &CLI, // for now (will return false). We need to determine the right alignment // based on the normal alignment for the underlying machine type. // - unsigned ArgSize = RoundUpToAlignment(ArgVT.getSizeInBits(), 4); + unsigned ArgSize = alignTo(ArgVT.getSizeInBits(), 4); unsigned BEAlign = 0; if (ArgSize < 8 && !Subtarget->isLittle()) |
