16 #ifndef LLVM_MC_MACHINELOCATION_H
17 #define LLVM_MC_MACHINELOCATION_H
20 #include "llvm/Support/DataTypes.h"
37 : IsRegister(
false), Register(0), Offset(0) {}
40 : IsRegister(
true), Register(R), Offset(0) {}
43 : IsRegister(
false), Register(R), Offset(O) {}
46 return IsRegister == Other.IsRegister && Register == Other.Register &&
47 Offset == Other.Offset;
53 bool isReg()
const {
return IsRegister; }
54 unsigned getReg()
const {
return Register; }
60 void set(
unsigned R) {
66 void set(
unsigned R,
int O) {
void set(unsigned R, int O)
Make this location a register-indirect+offset location.
bool operator==(const MachineLocation &Other) const
MachineLocation(unsigned R)
Create a direct register location.
MachineLocation(unsigned R, int O)
Create a register-indirect location with an offset.
void setIsRegister(bool Is)
void setRegister(unsigned R)
enum LLVM_ENUM_INT_TYPE(uint32_t)
void set(unsigned R)
Make this location a direct register location.