mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-30 17:33:24 +00:00
Clean up some code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31451 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
6fc40079f3
commit
c51737f46f
@ -19,6 +19,7 @@
|
|||||||
#include "Record.h"
|
#include "Record.h"
|
||||||
#include "llvm/ADT/StringExtras.h"
|
#include "llvm/ADT/StringExtras.h"
|
||||||
#include "llvm/Support/CommandLine.h"
|
#include "llvm/Support/CommandLine.h"
|
||||||
|
#include "llvm/Target/TargetInstrInfo.h"
|
||||||
#include <set>
|
#include <set>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
using namespace llvm;
|
using namespace llvm;
|
||||||
@ -294,7 +295,8 @@ static std::pair<unsigned, unsigned> parseConstraint(const std::string &CStr,
|
|||||||
unsigned TIdx = I->getOperandNamed(Name);
|
unsigned TIdx = I->getOperandNamed(Name);
|
||||||
if (TIdx >= FIdx)
|
if (TIdx >= FIdx)
|
||||||
throw "Illegal tied-to operand constraint '" + CStr + "'";
|
throw "Illegal tied-to operand constraint '" + CStr + "'";
|
||||||
return std::make_pair(FIdx, (TIdx << 16) | 1);
|
return std::make_pair(FIdx, (TIdx << 16) |
|
||||||
|
(1 << (unsigned)TargetInstrInfo::TIED_TO));
|
||||||
}
|
}
|
||||||
|
|
||||||
static std::vector<unsigned> parseConstraints(const std::string &CStr,
|
static std::vector<unsigned> parseConstraints(const std::string &CStr,
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
|
|
||||||
#include "InstrInfoEmitter.h"
|
#include "InstrInfoEmitter.h"
|
||||||
#include "CodeGenTarget.h"
|
#include "CodeGenTarget.h"
|
||||||
|
#include "llvm/Target/TargetInstrInfo.h"
|
||||||
#include "Record.h"
|
#include "Record.h"
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
using namespace llvm;
|
using namespace llvm;
|
||||||
@ -89,7 +90,7 @@ GetOperandInfo(const CodeGenInstruction &Inst) {
|
|||||||
// For backward compatibility: isTwoAddress means operand 1 is tied to
|
// For backward compatibility: isTwoAddress means operand 1 is tied to
|
||||||
// operand 0.
|
// operand 0.
|
||||||
if (Inst.isTwoAddress)
|
if (Inst.isTwoAddress)
|
||||||
Result[1].second |= 1;
|
Result[1].second |= (0 << 16) | (1 << (unsigned)TargetInstrInfo::TIED_TO);
|
||||||
|
|
||||||
return Result;
|
return Result;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user