forked from OSchip/llvm-project
Add method CreateCodeToCopyIntToFloat.
Include handle to TargetMachine in each Machine...Info object. llvm-svn: 1200
This commit is contained in:
parent
621b90440b
commit
06d8c600ea
|
@ -72,13 +72,17 @@ struct MachineInstrDescriptor {
|
||||||
|
|
||||||
|
|
||||||
class MachineInstrInfo : public NonCopyableV {
|
class MachineInstrInfo : public NonCopyableV {
|
||||||
|
public:
|
||||||
|
const TargetMachine& target;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
const MachineInstrDescriptor* desc; // raw array to allow static init'n
|
const MachineInstrDescriptor* desc; // raw array to allow static init'n
|
||||||
unsigned int descSize; // number of entries in the desc array
|
unsigned int descSize; // number of entries in the desc array
|
||||||
unsigned int numRealOpCodes; // number of non-dummy op codes
|
unsigned int numRealOpCodes; // number of non-dummy op codes
|
||||||
|
|
||||||
public:
|
public:
|
||||||
MachineInstrInfo(const MachineInstrDescriptor *desc, unsigned descSize,
|
MachineInstrInfo(const TargetMachine& tgt,
|
||||||
|
const MachineInstrDescriptor *desc, unsigned descSize,
|
||||||
unsigned numRealOpCodes);
|
unsigned numRealOpCodes);
|
||||||
virtual ~MachineInstrInfo();
|
virtual ~MachineInstrInfo();
|
||||||
|
|
||||||
|
@ -231,6 +235,19 @@ public:
|
||||||
Instruction* dest,
|
Instruction* dest,
|
||||||
vector<MachineInstr*>& minstrVec,
|
vector<MachineInstr*>& minstrVec,
|
||||||
vector<TmpInstruction*>& temps) const =0;
|
vector<TmpInstruction*>& temps) const =0;
|
||||||
|
|
||||||
|
// Create an instruction sequence to copy an integer value `val' from an
|
||||||
|
// integer to a floating point register `dest'. val must be an integral
|
||||||
|
// type. dest must be a Float or Double.
|
||||||
|
// The generated instructions are returned in `minstrVec'.
|
||||||
|
// Any temp. registers (TmpInstruction) created are returned in `tempVec'.
|
||||||
|
//
|
||||||
|
virtual void CreateCodeToCopyIntToFloat(Method* method,
|
||||||
|
Value* val,
|
||||||
|
Instruction* dest,
|
||||||
|
vector<MachineInstr*>& minstrVec,
|
||||||
|
vector<TmpInstruction*>& tempVec,
|
||||||
|
TargetMachine& target) const = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -72,13 +72,17 @@ struct MachineInstrDescriptor {
|
||||||
|
|
||||||
|
|
||||||
class MachineInstrInfo : public NonCopyableV {
|
class MachineInstrInfo : public NonCopyableV {
|
||||||
|
public:
|
||||||
|
const TargetMachine& target;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
const MachineInstrDescriptor* desc; // raw array to allow static init'n
|
const MachineInstrDescriptor* desc; // raw array to allow static init'n
|
||||||
unsigned int descSize; // number of entries in the desc array
|
unsigned int descSize; // number of entries in the desc array
|
||||||
unsigned int numRealOpCodes; // number of non-dummy op codes
|
unsigned int numRealOpCodes; // number of non-dummy op codes
|
||||||
|
|
||||||
public:
|
public:
|
||||||
MachineInstrInfo(const MachineInstrDescriptor *desc, unsigned descSize,
|
MachineInstrInfo(const TargetMachine& tgt,
|
||||||
|
const MachineInstrDescriptor *desc, unsigned descSize,
|
||||||
unsigned numRealOpCodes);
|
unsigned numRealOpCodes);
|
||||||
virtual ~MachineInstrInfo();
|
virtual ~MachineInstrInfo();
|
||||||
|
|
||||||
|
@ -231,6 +235,19 @@ public:
|
||||||
Instruction* dest,
|
Instruction* dest,
|
||||||
vector<MachineInstr*>& minstrVec,
|
vector<MachineInstr*>& minstrVec,
|
||||||
vector<TmpInstruction*>& temps) const =0;
|
vector<TmpInstruction*>& temps) const =0;
|
||||||
|
|
||||||
|
// Create an instruction sequence to copy an integer value `val' from an
|
||||||
|
// integer to a floating point register `dest'. val must be an integral
|
||||||
|
// type. dest must be a Float or Double.
|
||||||
|
// The generated instructions are returned in `minstrVec'.
|
||||||
|
// Any temp. registers (TmpInstruction) created are returned in `tempVec'.
|
||||||
|
//
|
||||||
|
virtual void CreateCodeToCopyIntToFloat(Method* method,
|
||||||
|
Value* val,
|
||||||
|
Instruction* dest,
|
||||||
|
vector<MachineInstr*>& minstrVec,
|
||||||
|
vector<TmpInstruction*>& tempVec,
|
||||||
|
TargetMachine& target) const = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue