1
- const // ===-- ARM/ARMCodeEmitter.cpp - Convert ARM code to machine code ---------===//
1
+ // ===-- ARM/ARMCodeEmitter.cpp - Convert ARM code to machine code ---------===//
2
2
//
3
3
// The LLVM Compiler Infrastructure
4
4
//
@@ -150,9 +150,8 @@ namespace {
150
150
151
151
// / getMachineOpValue - Return binary encoding of operand. If the machine
152
152
// / operand requires relocation, record the relocation and return zero.
153
- unsigned getMachineOpValue (const MachineInstr &MI,
154
- const MachineOperand &MO) const ;
155
- unsigned getMachineOpValue (const MachineInstr &MI, unsigned OpIdx) const {
153
+ unsigned getMachineOpValue (const MachineInstr &MI,const MachineOperand &MO);
154
+ unsigned getMachineOpValue (const MachineInstr &MI, unsigned OpIdx) {
156
155
return getMachineOpValue (MI, MI.getOperand (OpIdx));
157
156
}
158
157
@@ -170,12 +169,12 @@ namespace {
170
169
// / fixed up by the relocation stage.
171
170
void emitGlobalAddress (const GlobalValue *GV, unsigned Reloc,
172
171
bool MayNeedFarStub, bool Indirect,
173
- intptr_t ACPV = 0 ) const ;
174
- void emitExternalSymbolAddress (const char *ES, unsigned Reloc) const ;
175
- void emitConstPoolAddress (unsigned CPI, unsigned Reloc) const ;
176
- void emitJumpTableAddress (unsigned JTIndex, unsigned Reloc) const ;
172
+ intptr_t ACPV = 0 );
173
+ void emitExternalSymbolAddress (const char *ES, unsigned Reloc);
174
+ void emitConstPoolAddress (unsigned CPI, unsigned Reloc);
175
+ void emitJumpTableAddress (unsigned JTIndex, unsigned Reloc);
177
176
void emitMachineBasicBlock (MachineBasicBlock *BB, unsigned Reloc,
178
- intptr_t JTBase = 0 ) const ;
177
+ intptr_t JTBase = 0 );
179
178
};
180
179
}
181
180
@@ -263,7 +262,7 @@ unsigned ARMCodeEmitter::getMovi32Value(const MachineInstr &MI,
263
262
// / getMachineOpValue - Return binary encoding of operand. If the machine
264
263
// / operand requires relocation, record the relocation and return zero.
265
264
unsigned ARMCodeEmitter::getMachineOpValue (const MachineInstr &MI,
266
- const MachineOperand &MO) const {
265
+ const MachineOperand &MO) {
267
266
if (MO.isReg ())
268
267
return getARMRegisterNumbering (MO.getReg ());
269
268
else if (MO.isImm ())
@@ -295,7 +294,7 @@ unsigned ARMCodeEmitter::getMachineOpValue(const MachineInstr &MI,
295
294
// /
296
295
void ARMCodeEmitter::emitGlobalAddress (const GlobalValue *GV, unsigned Reloc,
297
296
bool MayNeedFarStub, bool Indirect,
298
- intptr_t ACPV) const {
297
+ intptr_t ACPV) {
299
298
MachineRelocation MR = Indirect
300
299
? MachineRelocation::getIndirectSymbol (MCE.getCurrentPCOffset (), Reloc,
301
300
const_cast <GlobalValue *>(GV),
@@ -309,16 +308,15 @@ void ARMCodeEmitter::emitGlobalAddress(const GlobalValue *GV, unsigned Reloc,
309
308
// / emitExternalSymbolAddress - Arrange for the address of an external symbol to
310
309
// / be emitted to the current location in the function, and allow it to be PC
311
310
// / relative.
312
- void ARMCodeEmitter::
313
- emitExternalSymbolAddress (const char *ES, unsigned Reloc) const {
311
+ void ARMCodeEmitter::emitExternalSymbolAddress (const char *ES, unsigned Reloc) {
314
312
MCE.addRelocation (MachineRelocation::getExtSym (MCE.getCurrentPCOffset (),
315
313
Reloc, ES));
316
314
}
317
315
318
316
// / emitConstPoolAddress - Arrange for the address of an constant pool
319
317
// / to be emitted to the current location in the function, and allow it to be PC
320
318
// / relative.
321
- void ARMCodeEmitter::emitConstPoolAddress (unsigned CPI, unsigned Reloc) const {
319
+ void ARMCodeEmitter::emitConstPoolAddress (unsigned CPI, unsigned Reloc) {
322
320
// Tell JIT emitter we'll resolve the address.
323
321
MCE.addRelocation (MachineRelocation::getConstPool (MCE.getCurrentPCOffset (),
324
322
Reloc, CPI, 0 , true ));
@@ -327,16 +325,14 @@ void ARMCodeEmitter::emitConstPoolAddress(unsigned CPI, unsigned Reloc) const {
327
325
// / emitJumpTableAddress - Arrange for the address of a jump table to
328
326
// / be emitted to the current location in the function, and allow it to be PC
329
327
// / relative.
330
- void ARMCodeEmitter::
331
- emitJumpTableAddress (unsigned JTIndex, unsigned Reloc) const {
328
+ void ARMCodeEmitter::emitJumpTableAddress (unsigned JTIndex, unsigned Reloc) {
332
329
MCE.addRelocation (MachineRelocation::getJumpTable (MCE.getCurrentPCOffset (),
333
330
Reloc, JTIndex, 0 , true ));
334
331
}
335
332
336
333
// / emitMachineBasicBlock - Emit the specified address basic block.
337
334
void ARMCodeEmitter::emitMachineBasicBlock (MachineBasicBlock *BB,
338
- unsigned Reloc,
339
- intptr_t JTBase) const {
335
+ unsigned Reloc, intptr_t JTBase) {
340
336
MCE.addRelocation (MachineRelocation::getBB (MCE.getCurrentPCOffset (),
341
337
Reloc, BB, JTBase));
342
338
}
0 commit comments