Eliminate unneeded parameter.

llvm-svn: 28907
This commit is contained in:
Evan Cheng 2006-06-22 00:02:55 +00:00
parent fc1b27dad1
commit 0c9b90aba3
1 changed files with 4 additions and 8 deletions

View File

@ -54,8 +54,7 @@ namespace {
void emitPCRelativeValue(unsigned Address); void emitPCRelativeValue(unsigned Address);
void emitGlobalAddressForCall(GlobalValue *GV, bool isTailCall); void emitGlobalAddressForCall(GlobalValue *GV, bool isTailCall);
void emitGlobalAddressForPtr(GlobalValue *GV, int Disp = 0); void emitGlobalAddressForPtr(GlobalValue *GV, int Disp = 0);
void emitExternalSymbolAddress(const char *ES, bool isPCRelative, void emitExternalSymbolAddress(const char *ES, bool isPCRelative);
bool isTailCall);
void emitDisplacementField(const MachineOperand *RelocOp, int DispVal); void emitDisplacementField(const MachineOperand *RelocOp, int DispVal);
@ -144,8 +143,7 @@ void Emitter::emitGlobalAddressForPtr(GlobalValue *GV, int Disp /* = 0 */) {
/// emitExternalSymbolAddress - Arrange for the address of an external symbol to /// emitExternalSymbolAddress - Arrange for the address of an external symbol to
/// be emitted to the current location in the function, and allow it to be PC /// be emitted to the current location in the function, and allow it to be PC
/// relative. /// relative.
void Emitter::emitExternalSymbolAddress(const char *ES, bool isPCRelative, void Emitter::emitExternalSymbolAddress(const char *ES, bool isPCRelative) {
bool isTailCall) {
MCE.addRelocation(MachineRelocation::getExtSym(MCE.getCurrentPCOffset(), MCE.addRelocation(MachineRelocation::getExtSym(MCE.getCurrentPCOffset(),
isPCRelative ? X86::reloc_pcrel_word : X86::reloc_absolute_word, ES)); isPCRelative ? X86::reloc_pcrel_word : X86::reloc_absolute_word, ES));
MCE.emitWordLE(0); MCE.emitWordLE(0);
@ -417,9 +415,7 @@ void Emitter::emitInstruction(const MachineInstr &MI) {
Opcode == X86::TAILJMPr || Opcode == X86::TAILJMPm; Opcode == X86::TAILJMPr || Opcode == X86::TAILJMPm;
emitGlobalAddressForCall(MO.getGlobal(), isTailCall); emitGlobalAddressForCall(MO.getGlobal(), isTailCall);
} else if (MO.isExternalSymbol()) { } else if (MO.isExternalSymbol()) {
bool isTailCall = Opcode == X86::TAILJMPd || emitExternalSymbolAddress(MO.getSymbolName(), true);
Opcode == X86::TAILJMPr || Opcode == X86::TAILJMPm;
emitExternalSymbolAddress(MO.getSymbolName(), true, isTailCall);
} else if (MO.isImmediate()) { } else if (MO.isImmediate()) {
emitConstant(MO.getImmedValue(), sizeOfImm(Desc)); emitConstant(MO.getImmedValue(), sizeOfImm(Desc));
} else { } else {
@ -439,7 +435,7 @@ void Emitter::emitInstruction(const MachineInstr &MI) {
} else if (MO1.isExternalSymbol()) { } else if (MO1.isExternalSymbol()) {
assert(sizeOfImm(Desc) == 4 && assert(sizeOfImm(Desc) == 4 &&
"Don't know how to emit non-pointer values!"); "Don't know how to emit non-pointer values!");
emitExternalSymbolAddress(MO1.getSymbolName(), false, false); emitExternalSymbolAddress(MO1.getSymbolName(), false);
} else if (MO1.isJumpTableIndex()) { } else if (MO1.isJumpTableIndex()) {
assert(sizeOfImm(Desc) == 4 && assert(sizeOfImm(Desc) == 4 &&
"Don't know how to emit non-pointer values!"); "Don't know how to emit non-pointer values!");