[llvm-commits] CVS: llvm/lib/Target/X86/X86ATTAsmPrinter.cpp X86AsmPrinter.cpp X86AsmPrinter.h
Jim Laskey
jlaskey at apple.com
Wed Jul 26 19:05:27 PDT 2006
Changes in directory llvm/lib/Target/X86:
X86ATTAsmPrinter.cpp updated: 1.55 -> 1.56
X86AsmPrinter.cpp updated: 1.190 -> 1.191
X86AsmPrinter.h updated: 1.24 -> 1.25
---
Log message:
Use the predicate.
---
Diffs of the changes: (+15 -15)
X86ATTAsmPrinter.cpp | 18 +++++++++---------
X86AsmPrinter.cpp | 10 +++++-----
X86AsmPrinter.h | 2 +-
3 files changed, 15 insertions(+), 15 deletions(-)
Index: llvm/lib/Target/X86/X86ATTAsmPrinter.cpp
diff -u llvm/lib/Target/X86/X86ATTAsmPrinter.cpp:1.55 llvm/lib/Target/X86/X86ATTAsmPrinter.cpp:1.56
--- llvm/lib/Target/X86/X86ATTAsmPrinter.cpp:1.55 Wed Jul 26 20:13:04 2006
+++ llvm/lib/Target/X86/X86ATTAsmPrinter.cpp Wed Jul 26 21:05:13 2006
@@ -26,7 +26,7 @@
/// method to print assembly for each instruction.
///
bool X86ATTAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
- if (Subtarget->TargetType == X86Subtarget::isDarwin) {
+ if (Subtarget->isTargetDarwin()) {
// Let PassManager know we need debug information and relay
// the MachineDebugInfo address on to DwarfWriter.
DW.SetDebugInfo(&getAnalysis<MachineDebugInfo>());
@@ -56,7 +56,7 @@
break;
case Function::WeakLinkage:
case Function::LinkOnceLinkage:
- if (Subtarget->TargetType == X86Subtarget::isDarwin) {
+ if (Subtarget->isTargetDarwin()) {
SwitchToTextSection(
".section __TEXT,__textcoal_nt,coalesced,pure_instructions", F);
O << "\t.globl\t" << CurrentFnName << "\n";
@@ -78,7 +78,7 @@
}
O << CurrentFnName << ":\n";
- if (Subtarget->TargetType == X86Subtarget::isDarwin) {
+ if (Subtarget->isTargetDarwin()) {
// Emit pre-function debug information.
DW.BeginFunction(&MF);
}
@@ -101,7 +101,7 @@
if (HasDotTypeDotSizeDirective)
O << "\t.size " << CurrentFnName << ", .-" << CurrentFnName << "\n";
- if (Subtarget->TargetType == X86Subtarget::isDarwin) {
+ if (Subtarget->isTargetDarwin()) {
// Emit post-function debug information.
DW.EndFunction();
}
@@ -143,7 +143,7 @@
if (!isMemOp) O << '$';
O << PrivateGlobalPrefix << "JTI" << getFunctionNumber() << "_"
<< MO.getJumpTableIndex();
- if (Subtarget->TargetType == X86Subtarget::isDarwin &&
+ if (Subtarget->isTargetDarwin() &&
TM.getRelocationModel() == Reloc::PIC_)
O << "-\"L" << getFunctionNumber() << "$pb\"";
return;
@@ -153,7 +153,7 @@
if (!isMemOp) O << '$';
O << PrivateGlobalPrefix << "CPI" << getFunctionNumber() << "_"
<< MO.getConstantPoolIndex();
- if (Subtarget->TargetType == X86Subtarget::isDarwin &&
+ if (Subtarget->isTargetDarwin() &&
TM.getRelocationModel() == Reloc::PIC_)
O << "-\"L" << getFunctionNumber() << "$pb\"";
int Offset = MO.getOffset();
@@ -168,7 +168,7 @@
bool isMemOp = Modifier && !strcmp(Modifier, "mem");
if (!isMemOp && !isCallOp) O << '$';
// Darwin block shameless ripped from PPCAsmPrinter.cpp
- if (Subtarget->TargetType == X86Subtarget::isDarwin &&
+ if (Subtarget->isTargetDarwin() &&
TM.getRelocationModel() != Reloc::Static) {
GlobalValue *GV = MO.getGlobal();
std::string Name = Mang->getValueName(GV);
@@ -201,7 +201,7 @@
case MachineOperand::MO_ExternalSymbol: {
bool isCallOp = Modifier && !strcmp(Modifier, "call");
if (isCallOp &&
- Subtarget->TargetType == X86Subtarget::isDarwin &&
+ Subtarget->isTargetDarwin() &&
TM.getRelocationModel() != Reloc::Static) {
std::string Name(GlobalPrefix);
Name += MO.getSymbolName();
@@ -344,7 +344,7 @@
void X86ATTAsmPrinter::printMachineInstruction(const MachineInstr *MI) {
++EmittedInsts;
// This works around some Darwin assembler bugs.
- if (Subtarget->TargetType == X86Subtarget::isDarwin) {
+ if (Subtarget->isTargetDarwin()) {
switch (MI->getOpcode()) {
case X86::REP_MOVSB:
O << "rep/movsb (%esi),(%edi)\n";
Index: llvm/lib/Target/X86/X86AsmPrinter.cpp
diff -u llvm/lib/Target/X86/X86AsmPrinter.cpp:1.190 llvm/lib/Target/X86/X86AsmPrinter.cpp:1.191
--- llvm/lib/Target/X86/X86AsmPrinter.cpp:1.190 Wed Jul 26 20:13:04 2006
+++ llvm/lib/Target/X86/X86AsmPrinter.cpp Wed Jul 26 21:05:13 2006
@@ -87,7 +87,7 @@
default: break;
}
- if (Subtarget->TargetType == X86Subtarget::isDarwin) {
+ if (Subtarget->isTargetDarwin()) {
// Emit initial debug information.
DW.BeginModule(&M);
}
@@ -118,7 +118,7 @@
if (C->isNullValue() && /* FIXME: Verify correct */
(I->hasInternalLinkage() || I->hasWeakLinkage() ||
I->hasLinkOnceLinkage() ||
- (Subtarget->TargetType == X86Subtarget::isDarwin &&
+ (Subtarget->isTargetDarwin() &&
I->hasExternalLinkage() && !I->hasSection()))) {
if (Size == 0) Size = 1; // .comm Foo, 0 is undefined, avoid it.
if (I->hasExternalLinkage()) {
@@ -130,7 +130,7 @@
if (LCOMMDirective != NULL) {
if (I->hasInternalLinkage()) {
O << LCOMMDirective << name << "," << Size;
- if (Subtarget->TargetType == X86Subtarget::isDarwin)
+ if (Subtarget->isTargetDarwin())
O << "," << (AlignmentIsInBytes ? (1 << Align) : Align);
} else
O << COMMDirective << name << "," << Size;
@@ -149,7 +149,7 @@
switch (I->getLinkage()) {
case GlobalValue::LinkOnceLinkage:
case GlobalValue::WeakLinkage:
- if (Subtarget->TargetType == X86Subtarget::isDarwin) {
+ if (Subtarget->isTargetDarwin()) {
O << "\t.globl " << name << "\n"
<< "\t.weak_definition " << name << "\n";
SwitchToDataSection(".section __DATA,__const_coal,coalesced", I);
@@ -186,7 +186,7 @@
}
}
- if (Subtarget->TargetType == X86Subtarget::isDarwin) {
+ if (Subtarget->isTargetDarwin()) {
SwitchToDataSection("", 0);
// Output stubs for dynamically-linked functions
Index: llvm/lib/Target/X86/X86AsmPrinter.h
diff -u llvm/lib/Target/X86/X86AsmPrinter.h:1.24 llvm/lib/Target/X86/X86AsmPrinter.h:1.25
--- llvm/lib/Target/X86/X86AsmPrinter.h:1.24 Wed Jul 26 20:12:23 2006
+++ llvm/lib/Target/X86/X86AsmPrinter.h Wed Jul 26 21:05:13 2006
@@ -64,7 +64,7 @@
void getAnalysisUsage(AnalysisUsage &AU) const {
AU.setPreservesAll();
- if (Subtarget->TargetType == X86Subtarget::isDarwin) {
+ if (Subtarget->isTargetDarwin()) {
AU.addRequired<MachineDebugInfo>();
}
MachineFunctionPass::getAnalysisUsage(AU);
More information about the llvm-commits
mailing list