mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-07 14:33:15 +00:00
* Add support for new types of operands
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5210 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
3c8cbe6567
commit
9d4f9b9902
@ -18,9 +18,9 @@
|
||||
|
||||
#include "llvm/CodeGen/MachineInstr.h"
|
||||
|
||||
struct MachineInstrBuilder {
|
||||
class MachineInstrBuilder {
|
||||
MachineInstr *MI;
|
||||
|
||||
public:
|
||||
MachineInstrBuilder(MachineInstr *mi) : MI(mi) {}
|
||||
|
||||
/// Allow automatic conversion to the machine instruction we are working on.
|
||||
@ -91,6 +91,23 @@ struct MachineInstrBuilder {
|
||||
MI->addFrameIndexOperand(Idx);
|
||||
return *this;
|
||||
}
|
||||
|
||||
const MachineInstrBuilder &addConstantPoolIndex(unsigned Idx) const {
|
||||
MI->addConstantPoolIndexOperand(Idx);
|
||||
return *this;
|
||||
}
|
||||
|
||||
const MachineInstrBuilder &addGlobalAddress(GlobalValue *GV,
|
||||
bool isPCRelative = false) const {
|
||||
MI->addGlobalAddressOperand(GV, isPCRelative);
|
||||
return *this;
|
||||
}
|
||||
|
||||
const MachineInstrBuilder &addExternalSymbol(const std::string &Name,
|
||||
bool isPCRelative = false) const{
|
||||
MI->addExternalSymbolOperand(Name, isPCRelative);
|
||||
return *this;
|
||||
}
|
||||
};
|
||||
|
||||
/// BuildMI - Builder interface. Specify how to create the initial instruction
|
||||
|
Loading…
x
Reference in New Issue
Block a user