2002-08-09 20:08:03 +00:00
|
|
|
//===-- llvm/CodeGen/InstrSelectionSupport.h --------------------*- C++ -*-===//
|
|
|
|
//
|
|
|
|
// Target-independent instruction selection code. See SparcInstrSelection.cpp
|
|
|
|
// for usage.
|
2001-10-10 20:50:43 +00:00
|
|
|
//
|
2002-08-09 20:08:03 +00:00
|
|
|
//===----------------------------------------------------------------------===//
|
2001-10-10 20:50:43 +00:00
|
|
|
|
|
|
|
#ifndef LLVM_CODEGEN_INSTR_SELECTION_SUPPORT_H
|
|
|
|
#define LLVM_CODEGEN_INSTR_SELECTION_SUPPORT_H
|
|
|
|
|
|
|
|
#include "llvm/CodeGen/MachineInstr.h"
|
2002-10-28 02:29:46 +00:00
|
|
|
#include "Support/DataTypes.h"
|
2001-10-10 20:50:43 +00:00
|
|
|
class InstructionNode;
|
|
|
|
class TargetMachine;
|
2003-01-15 00:02:41 +00:00
|
|
|
class Instruction;
|
2001-10-10 20:50:43 +00:00
|
|
|
|
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
// Function: ChooseRegOrImmed
|
|
|
|
//
|
|
|
|
// Purpose:
|
|
|
|
//
|
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
|
2002-02-04 05:52:08 +00:00
|
|
|
MachineOperand::MachineOperandType ChooseRegOrImmed(
|
|
|
|
Value* val,
|
2001-10-10 20:50:43 +00:00
|
|
|
MachineOpCode opCode,
|
|
|
|
const TargetMachine& targetMachine,
|
|
|
|
bool canUseImmed,
|
2003-01-15 00:02:41 +00:00
|
|
|
unsigned& getMachineRegNum,
|
2001-10-10 20:50:43 +00:00
|
|
|
int64_t& getImmedValue);
|
2002-09-16 15:58:34 +00:00
|
|
|
|
|
|
|
MachineOperand::MachineOperandType ChooseRegOrImmed(int64_t intValue,
|
|
|
|
bool isSigned,
|
|
|
|
MachineOpCode opCode,
|
|
|
|
const TargetMachine& target,
|
|
|
|
bool canUseImmed,
|
2003-01-15 00:02:41 +00:00
|
|
|
unsigned& getMachineRegNum,
|
2002-09-16 15:58:34 +00:00
|
|
|
int64_t& getImmedValue);
|
2001-10-10 20:50:43 +00:00
|
|
|
|
|
|
|
#endif
|