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