1 //===-- llvm/MC/MCImm.h - MCImm class ---------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file contains the declaration of the MCInst and MCOperand classes, which
11 // is the basic representation used to represent low-level machine code
14 //===----------------------------------------------------------------------===//
16 #ifndef LLVM_MC_MCIMM_H
17 #define LLVM_MC_MCIMM_H
19 #include "llvm/Support/DataTypes.h"
24 /// MCImm - This represents an "assembler immediate". In its most general form,
25 /// this can hold "SymbolA - SymbolB + imm64". Not all targets supports
26 /// relocations of this general form, but we need to represent this anyway.
28 MCSymbol *SymA, *SymB;
32 int64_t getCst() const { return Cst; }
33 MCSymbol *getSymA() const { return SymA; }
34 MCSymbol *getSymB() const { return SymB; }
37 static MCImm get(MCSymbol *SymA, MCSymbol *SymB = 0, int64_t Val = 0) {
45 static MCImm get(int64_t Val) {
55 } // end namespace llvm