mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-05-13 01:15:32 +00:00
Remove default operands that are never used
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4357 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
413746e983
commit
7279122e66
@ -225,8 +225,8 @@ class MachineInstr : public Annotable, // MachineInstrs are annotable
|
|||||||
// OperandComplete - Return true if it's illegal to add a new operand
|
// OperandComplete - Return true if it's illegal to add a new operand
|
||||||
bool OperandsComplete() const;
|
bool OperandsComplete() const;
|
||||||
public:
|
public:
|
||||||
MachineInstr(MachineOpCode Opcode, OpCodeMask OpcodeMask = 0);
|
MachineInstr(MachineOpCode Opcode);
|
||||||
MachineInstr(MachineOpCode Opcode, unsigned numOperands, OpCodeMask Mask = 0);
|
MachineInstr(MachineOpCode Opcode, unsigned numOperands);
|
||||||
|
|
||||||
/// MachineInstr ctor - This constructor only does a _reserve_ of the
|
/// MachineInstr ctor - This constructor only does a _reserve_ of the
|
||||||
/// operands, not a resize for them. It is expected that if you use this that
|
/// operands, not a resize for them. It is expected that if you use this that
|
||||||
|
@ -9,20 +9,24 @@ using std::cerr;
|
|||||||
|
|
||||||
|
|
||||||
// Constructor for instructions with fixed #operands (nearly all)
|
// Constructor for instructions with fixed #operands (nearly all)
|
||||||
MachineInstr::MachineInstr(MachineOpCode _opCode,
|
MachineInstr::MachineInstr(MachineOpCode _opCode)
|
||||||
OpCodeMask _opCodeMask)
|
: opCode(_opCode), opCodeMask(0),
|
||||||
: opCode(_opCode), opCodeMask(_opCodeMask),
|
|
||||||
operands(TargetInstrDescriptors[_opCode].numOperands, MachineOperand()) {
|
operands(TargetInstrDescriptors[_opCode].numOperands, MachineOperand()) {
|
||||||
assert(TargetInstrDescriptors[_opCode].numOperands >= 0);
|
assert(TargetInstrDescriptors[_opCode].numOperands >= 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Constructor for instructions with variable #operands
|
// Constructor for instructions with variable #operands
|
||||||
MachineInstr::MachineInstr(MachineOpCode OpCode, unsigned numOperands,
|
MachineInstr::MachineInstr(MachineOpCode OpCode, unsigned numOperands/*,
|
||||||
OpCodeMask OpCodeMask)
|
OpCodeMask OpCodeMask*/)
|
||||||
: opCode(OpCode), opCodeMask(OpCodeMask),
|
: opCode(OpCode), opCodeMask(0/*OpCodeMask*/),
|
||||||
operands(numOperands, MachineOperand()) {
|
operands(numOperands, MachineOperand()) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MachineInstr::MachineInstr(MachineOpCode Opcode, unsigned numOperands,
|
||||||
|
bool XX, bool YY) : opCode(Opcode), opCodeMask(0) {
|
||||||
|
operands.reserve(numOperands);
|
||||||
|
}
|
||||||
|
|
||||||
// OperandComplete - Return true if it's illegal to add a new operand
|
// OperandComplete - Return true if it's illegal to add a new operand
|
||||||
bool MachineInstr::OperandsComplete() const {
|
bool MachineInstr::OperandsComplete() const {
|
||||||
int NumOperands = TargetInstrDescriptors[opCode].numOperands;
|
int NumOperands = TargetInstrDescriptors[opCode].numOperands;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user