LLVM
4.0.0
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
llvm.src
lib
Target
PowerPC
PPCInstrBuilder.h
Go to the documentation of this file.
1
//===-- PPCInstrBuilder.h - Aides for building PPC insts --------*- C++ -*-===//
2
//
3
// The LLVM Compiler Infrastructure
4
//
5
// This file is distributed under the University of Illinois Open Source
6
// License. See LICENSE.TXT for details.
7
//
8
//===----------------------------------------------------------------------===//
9
//
10
// This file exposes functions that may be used with BuildMI from the
11
// MachineInstrBuilder.h file to simplify generating frame and constant pool
12
// references.
13
//
14
// For reference, the order of operands for memory references is:
15
// (Operand), Dest Reg, Base Reg, and either Reg Index or Immediate
16
// Displacement.
17
//
18
//===----------------------------------------------------------------------===//
19
20
#ifndef LLVM_LIB_TARGET_POWERPC_PPCINSTRBUILDER_H
21
#define LLVM_LIB_TARGET_POWERPC_PPCINSTRBUILDER_H
22
23
#include "
llvm/CodeGen/MachineInstrBuilder.h
"
24
25
namespace
llvm {
26
27
/// addFrameReference - This function is used to add a reference to the base of
28
/// an abstract object on the stack frame of the current function. This
29
/// reference has base register as the FrameIndex offset until it is resolved.
30
/// This allows a constant offset to be specified as well...
31
///
32
static
inline
const
MachineInstrBuilder&
33
addFrameReference
(
const
MachineInstrBuilder
&MIB,
int
FI,
int
Offset
= 0,
34
bool
mem =
true
) {
35
if
(mem)
36
return
MIB.
addImm
(
Offset
).
addFrameIndex
(FI);
37
else
38
return
MIB.
addFrameIndex
(FI).
addImm
(
Offset
);
39
}
40
41
}
// End llvm namespace
42
43
#endif
llvm::MachineInstrBuilder::addImm
const MachineInstrBuilder & addImm(int64_t Val) const
Add a new immediate operand.
Definition:
MachineInstrBuilder.h:102
MachineInstrBuilder.h
Offset
uint32_t Offset
Definition:
SymbolizableObjectFile.cpp:77
llvm::addFrameReference
static const MachineInstrBuilder & addFrameReference(const MachineInstrBuilder &MIB, int FI, int Offset=0, bool mem=true)
addFrameReference - This function is used to add a reference to the base of an abstract object on the...
Definition:
PPCInstrBuilder.h:33
llvm::MachineInstrBuilder::addFrameIndex
const MachineInstrBuilder & addFrameIndex(int Idx) const
Definition:
MachineInstrBuilder.h:123
llvm::MachineInstrBuilder
Definition:
MachineInstrBuilder.h:47
Generated on Wed Mar 8 2017 17:19:13 for LLVM by
1.8.6