diff --git a/lib/Target/ARM/ARMAsmPrinter.cpp b/lib/Target/ARM/ARMAsmPrinter.cpp index dd7e20fcd04..f8d4da58f0b 100644 --- a/lib/Target/ARM/ARMAsmPrinter.cpp +++ b/lib/Target/ARM/ARMAsmPrinter.cpp @@ -749,15 +749,6 @@ void ARMAsmPrinter::emitAttributes() { ARMBuildAttrs::Allowed); AttrEmitter->EmitAttribute(ARMBuildAttrs::THUMB_ISA_use, ARMBuildAttrs::Allowed); - } else if (CPUString == "generic") { - // For a generic CPU, we assume a standard v7a architecture in Subtarget. - AttrEmitter->EmitAttribute(ARMBuildAttrs::CPU_arch, ARMBuildAttrs::v7); - AttrEmitter->EmitAttribute(ARMBuildAttrs::CPU_arch_profile, - ARMBuildAttrs::ApplicationProfile); - AttrEmitter->EmitAttribute(ARMBuildAttrs::ARM_ISA_use, - ARMBuildAttrs::Allowed); - AttrEmitter->EmitAttribute(ARMBuildAttrs::THUMB_ISA_use, - ARMBuildAttrs::AllowThumb32); } else if (Subtarget->hasV7Ops()) { AttrEmitter->EmitAttribute(ARMBuildAttrs::CPU_arch, ARMBuildAttrs::v7); AttrEmitter->EmitAttribute(ARMBuildAttrs::THUMB_ISA_use, @@ -772,6 +763,8 @@ void ARMAsmPrinter::emitAttributes() { AttrEmitter->EmitAttribute(ARMBuildAttrs::CPU_arch, ARMBuildAttrs::v5T); else if (Subtarget->hasV4TOps()) AttrEmitter->EmitAttribute(ARMBuildAttrs::CPU_arch, ARMBuildAttrs::v4T); + else + AttrEmitter->EmitAttribute(ARMBuildAttrs::CPU_arch, ARMBuildAttrs::v4); if (Subtarget->hasNEON() && emitFPU) { /* NEON is not exactly a VFP architecture, but GAS emit one of diff --git a/test/CodeGen/ARM/2010-10-19-mc-elf-objheader.ll b/test/CodeGen/ARM/2010-10-19-mc-elf-objheader.ll index b253fefe87c..d19adcc1eb9 100644 --- a/test/CodeGen/ARM/2010-10-19-mc-elf-objheader.ll +++ b/test/CodeGen/ARM/2010-10-19-mc-elf-objheader.ll @@ -15,15 +15,14 @@ ; BASIC-NEXT: ] ; BASIC-NEXT: Address: 0x0 ; BASIC-NEXT: Offset: 0x3C -; BASIC-NEXT: Size: 34 +; BASIC-NEXT: Size: 28 ; BASIC-NEXT: Link: 0 ; BASIC-NEXT: Info: 0 ; BASIC-NEXT: AddressAlignment: 1 ; BASIC-NEXT: EntrySize: 0 ; BASIC-NEXT: SectionData ( -; BASIC-NEXT: 0000: 41210000 00616561 62690001 17000000 -; BASIC-NEXT: 0010: 060A0741 08010902 14011501 17031801 -; BASIC-NEXT: 0020: 1901 +; BASIC-NEXT: 0000: 411B0000 00616561 62690001 11000000 +; BASIC-NEXT: 0010: 06011401 15011703 18011901 ; BASIC-NEXT: ) ; CORTEXA8: Name: .ARM.attributes