342 lines · plain
1; RUN: llc -verify-machineinstrs -mcpu=pwr7 -mtriple powerpc-ibm-aix-xcoff -data-sections=false < %s | \2; RUN: FileCheck --check-prefixes=CHECK,CHECK32 %s3; RUN: llc -verify-machineinstrs -mcpu=pwr7 -mtriple powerpc64-ibm-aix-xcoff -data-sections=false < %s | \4; RUN: FileCheck --check-prefixes=CHECK,CHECK64 %s5 6; RUN: llc -verify-machineinstrs -mcpu=pwr7 -mtriple powerpc-ibm-aix-xcoff -data-sections=false \7; RUN: -filetype=obj -o %t.o < %s8; RUN: llvm-readobj --section-headers --file-header %t.o | \9; RUN: FileCheck --check-prefixes=OBJ,OBJ32 %s10; RUN: llvm-readobj --syms %t.o | FileCheck --check-prefixes=SYMS,SYMS32 %s11; RUN: llvm-objdump -D %t.o | FileCheck --check-prefix=DIS %s12 13; RUN: llc -verify-machineinstrs -mcpu=pwr7 -mtriple powerpc64-ibm-aix-xcoff -data-sections=false \14; RUN: -filetype=obj -o %t64.o < %s15; RUN: llvm-readobj --section-headers --file-header %t64.o | \16; RUN: FileCheck --check-prefixes=OBJ,OBJ64 %s17; RUN: llvm-readobj --syms %t64.o | FileCheck --check-prefixes=SYMS,SYMS64 %s18 19@const_ivar = constant i32 35, align 420@const_llvar = constant i64 36, align 821@const_svar = constant i16 37, align 222@const_fvar = constant float 8.000000e+02, align 423@const_dvar = constant double 9.000000e+02, align 824@const_over_aligned = constant double 9.000000e+02, align 3225@const_chrarray = constant [4 x i8] c"abcd", align 126@const_dblarr = constant [4 x double] [double 1.000000e+00, double 2.000000e+00, double 3.000000e+00, double 4.000000e+00], align 827 28; CHECK: .csect .rodata[RO],529; CHECK-NEXT: .globl const_ivar30; CHECK-NEXT: .align 231; CHECK-NEXT: const_ivar:32; CHECK-NEXT: .vbyte 4, 3533; CHECK-NEXT: .globl const_llvar34; CHECK-NEXT: .align 335; CHECK-NEXT: const_llvar:36; CHECK32-NEXT: .vbyte 4, 037; CHECK32-NEXT: .vbyte 4, 3638; CHECK64-NEXT: .vbyte 8, 3639; CHECK-NEXT: .globl const_svar40; CHECK-NEXT: .align 141; CHECK-NEXT: const_svar:42; CHECK-NEXT: .vbyte 2, 3743; CHECK-NEXT: .globl const_fvar44; CHECK-NEXT: .align 245; CHECK-NEXT: const_fvar:46; CHECK-NEXT: .vbyte 4, 0x4448000047; CHECK-NEXT: .globl const_dvar48; CHECK-NEXT: .align 349; CHECK-NEXT: const_dvar:50; CHECK32-NEXT: .vbyte 4, 108292505651; CHECK32-NEXT: .vbyte 4, 052; CHECK64-NEXT: .vbyte 8, 0x408c20000000000053; CHECK-NEXT: .globl const_over_aligned54; CHECK-NEXT: .align 555; CHECK-NEXT: const_over_aligned:56; CHECK32-NEXT: .vbyte 4, 108292505657; CHECK32-NEXT: .vbyte 4, 058; CHECK64-NEXT: .vbyte 8, 0x408c20000000000059; CHECK-NEXT: .globl const_chrarray60; CHECK-NEXT: const_chrarray:61; CHECK-NEXT: .byte "abcd"62; CHECK-NEXT: .globl const_dblarr63; CHECK-NEXT: .align 364; CHECK-NEXT: const_dblarr:65; CHECK32-NEXT: .vbyte 4, 107269324866; CHECK32-NEXT: .vbyte 4, 067; CHECK64-NEXT: .vbyte 8, 0x3ff000000000000068; CHECK32-NEXT: .vbyte 4, 107374182469; CHECK32-NEXT: .vbyte 4, 070; CHECK64-NEXT: .vbyte 8, 0x400000000000000071; CHECK32-NEXT: .vbyte 4, 107426611272; CHECK32-NEXT: .vbyte 4, 073; CHECK64-NEXT: .vbyte 8, 0x400800000000000074; CHECK32-NEXT: .vbyte 4, 107479040075; CHECK32-NEXT: .vbyte 4, 076; CHECK64-NEXT: .vbyte 8, 0x401000000000000077 78; OBJ: FileHeader {79; OBJ32-NEXT: Magic: 0x1DF80; OBJ64-NEXT: Magic: 0x1F781; OBJ-NEXT: NumberOfSections: 182; OBJ-NEXT: TimeStamp: None (0x0)83; OBJ32-NEXT: SymbolTableOffset: 0x8C84; OBJ64-NEXT: SymbolTableOffset: 0xB085; OBJ-NEXT: SymbolTableEntries: 2386; OBJ-NEXT: OptionalHeaderSize: 0x087; OBJ-NEXT: Flags: 0x088; OBJ-NEXT: }89 90; OBJ: Sections [91; OBJ: Section {92; OBJ-NEXT: Index: 193; OBJ-NEXT: Name: .text94; OBJ-NEXT: PhysicalAddress: 0x095; OBJ-NEXT: VirtualAddress: 0x096; OBJ32-NEXT: Size: 0x5097; OBJ32-NEXT: RawDataOffset: 0x3C98; OBJ64-NEXT: Size: 0x5099; OBJ64-NEXT: RawDataOffset: 0x60100; OBJ-NEXT: RelocationPointer: 0x0101; OBJ-NEXT: LineNumberPointer: 0x0102; OBJ-NEXT: NumberOfRelocations: 0103; OBJ-NEXT: NumberOfLineNumbers: 0104; OBJ-NEXT: Type: STYP_TEXT (0x20)105; OBJ-NEXT: }106; OBJ-NEXT: ]107 108; SYMS: Symbols [109; SYMS: Symbol {{[{][[:space:]] *}}Index: [[#INDX:]]{{[[:space:]] *}}Name: .rodata110; SYMS-NEXT: Value (RelocatableAddress): 0x0111; SYMS-NEXT: Section: .text112; SYMS-NEXT: Type: 0x0113; SYMS-NEXT: StorageClass: C_HIDEXT (0x6B)114; SYMS-NEXT: NumberOfAuxEntries: 1115; SYMS-NEXT: CSECT Auxiliary Entry {116; SYMS-NEXT: Index: [[#INDX+1]]117; SYMS-NEXT: SectionLen: 80118; SYMS-NEXT: ParameterHashIndex: 0x0119; SYMS-NEXT: TypeChkSectNum: 0x0120; SYMS-NEXT: SymbolAlignmentLog2: 5121; SYMS-NEXT: SymbolType: XTY_SD (0x1)122; SYMS-NEXT: StorageMappingClass: XMC_RO (0x1)123; SYMS32-NEXT: StabInfoIndex: 0x0124; SYMS32-NEXT: StabSectNum: 0x0125; SYMS64-NEXT: Auxiliary Type: AUX_CSECT (0xFB)126; SYMS-NEXT: }127; SYMS-NEXT: }128 129; SYMS: Symbol {130; SYMS-NEXT: Index: [[#INDX+2]]131; SYMS-NEXT: Name: const_ivar132; SYMS-NEXT: Value (RelocatableAddress): 0x0133; SYMS-NEXT: Section: .text134; SYMS-NEXT: Type: 0x0135; SYMS-NEXT: StorageClass: C_EXT (0x2)136; SYMS-NEXT: NumberOfAuxEntries: 1137; SYMS-NEXT: CSECT Auxiliary Entry {138; SYMS-NEXT: Index: [[#INDX+3]]139; SYMS-NEXT: ContainingCsectSymbolIndex: [[#INDX]]140; SYMS-NEXT: ParameterHashIndex: 0x0141; SYMS-NEXT: TypeChkSectNum: 0x0142; SYMS-NEXT: SymbolAlignmentLog2: 0143; SYMS-NEXT: SymbolType: XTY_LD (0x2)144; SYMS-NEXT: StorageMappingClass: XMC_RO (0x1)145; SYMS32-NEXT: StabInfoIndex: 0x0146; SYMS32-NEXT: StabSectNum: 0x0147; SYMS64-NEXT: Auxiliary Type: AUX_CSECT (0xFB)148; SYMS-NEXT: }149; SYMS-NEXT: }150 151; SYMS: Symbol {152; SYMS-NEXT: Index: [[#INDX+4]]153; SYMS-NEXT: Name: const_llvar154; SYMS-NEXT: Value (RelocatableAddress): 0x8155; SYMS-NEXT: Section: .text156; SYMS-NEXT: Type: 0x0157; SYMS-NEXT: StorageClass: C_EXT (0x2)158; SYMS-NEXT: NumberOfAuxEntries: 1159; SYMS-NEXT: CSECT Auxiliary Entry {160; SYMS-NEXT: Index: [[#INDX+5]]161; SYMS-NEXT: ContainingCsectSymbolIndex: [[#INDX]]162; SYMS-NEXT: ParameterHashIndex: 0x0163; SYMS-NEXT: TypeChkSectNum: 0x0164; SYMS-NEXT: SymbolAlignmentLog2: 0165; SYMS-NEXT: SymbolType: XTY_LD (0x2)166; SYMS-NEXT: StorageMappingClass: XMC_RO (0x1)167; SYMS32-NEXT: StabInfoIndex: 0x0168; SYMS32-NEXT: StabSectNum: 0x0169; SYMS64-NEXT: Auxiliary Type: AUX_CSECT (0xFB)170; SYMS-NEXT: }171; SYMS-NEXT: }172 173; SYMS: Symbol {174; SYMS-NEXT: Index: [[#INDX+6]]175; SYMS-NEXT: Name: const_svar176; SYMS-NEXT: Value (RelocatableAddress): 0x10177; SYMS-NEXT: Section: .text178; SYMS-NEXT: Type: 0x0179; SYMS-NEXT: StorageClass: C_EXT (0x2)180; SYMS-NEXT: NumberOfAuxEntries: 1181; SYMS-NEXT: CSECT Auxiliary Entry {182; SYMS-NEXT: Index: [[#INDX+7]]183; SYMS-NEXT: ContainingCsectSymbolIndex: [[#INDX]]184; SYMS-NEXT: ParameterHashIndex: 0x0185; SYMS-NEXT: TypeChkSectNum: 0x0186; SYMS-NEXT: SymbolAlignmentLog2: 0187; SYMS-NEXT: SymbolType: XTY_LD (0x2)188; SYMS-NEXT: StorageMappingClass: XMC_RO (0x1)189; SYMS32-NEXT: StabInfoIndex: 0x0190; SYMS32-NEXT: StabSectNum: 0x0191; SYMS64-NEXT: Auxiliary Type: AUX_CSECT (0xFB)192; SYMS-NEXT: }193; SYMS-NEXT: }194 195; SYMS: Symbol {196; SYMS-NEXT: Index: [[#INDX+8]]197; SYMS-NEXT: Name: const_fvar198; SYMS-NEXT: Value (RelocatableAddress): 0x14199; SYMS-NEXT: Section: .text200; SYMS-NEXT: Type: 0x0201; SYMS-NEXT: StorageClass: C_EXT (0x2)202; SYMS-NEXT: NumberOfAuxEntries: 1203; SYMS-NEXT: CSECT Auxiliary Entry {204; SYMS-NEXT: Index: [[#INDX+9]]205; SYMS-NEXT: ContainingCsectSymbolIndex: [[#INDX]]206; SYMS-NEXT: ParameterHashIndex: 0x0207; SYMS-NEXT: TypeChkSectNum: 0x0208; SYMS-NEXT: SymbolAlignmentLog2: 0209; SYMS-NEXT: SymbolType: XTY_LD (0x2)210; SYMS-NEXT: StorageMappingClass: XMC_RO (0x1)211; SYMS32-NEXT: StabInfoIndex: 0x0212; SYMS32-NEXT: StabSectNum: 0x0213; SYMS64-NEXT: Auxiliary Type: AUX_CSECT (0xFB)214; SYMS-NEXT: }215; SYMS-NEXT: }216 217; SYMS: Symbol {218; SYMS-NEXT: Index: [[#INDX+10]]219; SYMS-NEXT: Name: const_dvar220; SYMS-NEXT: Value (RelocatableAddress): 0x18221; SYMS-NEXT: Section: .text222; SYMS-NEXT: Type: 0x0223; SYMS-NEXT: StorageClass: C_EXT (0x2)224; SYMS-NEXT: NumberOfAuxEntries: 1225; SYMS-NEXT: CSECT Auxiliary Entry {226; SYMS-NEXT: Index: [[#INDX+11]]227; SYMS-NEXT: ContainingCsectSymbolIndex: [[#INDX]]228; SYMS-NEXT: ParameterHashIndex: 0x0229; SYMS-NEXT: TypeChkSectNum: 0x0230; SYMS-NEXT: SymbolAlignmentLog2: 0231; SYMS-NEXT: SymbolType: XTY_LD (0x2)232; SYMS-NEXT: StorageMappingClass: XMC_RO (0x1)233; SYMS32-NEXT: StabInfoIndex: 0x0234; SYMS32-NEXT: StabSectNum: 0x0235; SYMS64-NEXT: Auxiliary Type: AUX_CSECT (0xFB)236; SYMS-NEXT: }237; SYMS-NEXT: }238 239; SYMS: Symbol {240; SYMS-NEXT: Index: [[#INDX+12]]241; SYMS-NEXT: Name: const_over_aligned242; SYMS-NEXT: Value (RelocatableAddress): 0x20243; SYMS-NEXT: Section: .text244; SYMS-NEXT: Type: 0x0245; SYMS-NEXT: StorageClass: C_EXT (0x2)246; SYMS-NEXT: NumberOfAuxEntries: 1247; SYMS-NEXT: CSECT Auxiliary Entry {248; SYMS-NEXT: Index: [[#INDX+13]]249; SYMS-NEXT: ContainingCsectSymbolIndex: [[#INDX]]250; SYMS-NEXT: ParameterHashIndex: 0x0251; SYMS-NEXT: TypeChkSectNum: 0x0252; SYMS-NEXT: SymbolAlignmentLog2: 0253; SYMS-NEXT: SymbolType: XTY_LD (0x2)254; SYMS-NEXT: StorageMappingClass: XMC_RO (0x1)255; SYMS32-NEXT: StabInfoIndex: 0x0256; SYMS32-NEXT: StabSectNum: 0x0257; SYMS64-NEXT: Auxiliary Type: AUX_CSECT (0xFB)258; SYMS-NEXT: }259; SYMS-NEXT: }260 261; SYMS: Symbol {262; SYMS-NEXT: Index: [[#INDX+14]]263; SYMS-NEXT: Name: const_chrarray264; SYMS-NEXT: Value (RelocatableAddress): 0x28265; SYMS-NEXT: Section: .text266; SYMS-NEXT: Type: 0x0267; SYMS-NEXT: StorageClass: C_EXT (0x2)268; SYMS-NEXT: NumberOfAuxEntries: 1269; SYMS-NEXT: CSECT Auxiliary Entry {270; SYMS-NEXT: Index: [[#INDX+15]]271; SYMS-NEXT: ContainingCsectSymbolIndex: [[#INDX]]272; SYMS-NEXT: ParameterHashIndex: 0x0273; SYMS-NEXT: TypeChkSectNum: 0x0274; SYMS-NEXT: SymbolAlignmentLog2: 0275; SYMS-NEXT: SymbolType: XTY_LD (0x2)276; SYMS-NEXT: StorageMappingClass: XMC_RO (0x1)277; SYMS32-NEXT: StabInfoIndex: 0x0278; SYMS32-NEXT: StabSectNum: 0x0279; SYMS64-NEXT: Auxiliary Type: AUX_CSECT (0xFB)280; SYMS-NEXT: }281; SYMS-NEXT: }282 283; SYMS: Symbol {284; SYMS-NEXT: Index: [[#INDX+16]]285; SYMS-NEXT: Name: const_dblarr286; SYMS-NEXT: Value (RelocatableAddress): 0x30287; SYMS-NEXT: Section: .text288; SYMS-NEXT: Type: 0x0289; SYMS-NEXT: StorageClass: C_EXT (0x2)290; SYMS-NEXT: NumberOfAuxEntries: 1291; SYMS-NEXT: CSECT Auxiliary Entry {292; SYMS-NEXT: Index: [[#INDX+17]]293; SYMS-NEXT: ContainingCsectSymbolIndex: [[#INDX]]294; SYMS-NEXT: ParameterHashIndex: 0x0295; SYMS-NEXT: TypeChkSectNum: 0x0296; SYMS-NEXT: SymbolAlignmentLog2: 0297; SYMS-NEXT: SymbolType: XTY_LD (0x2)298; SYMS-NEXT: StorageMappingClass: XMC_RO (0x1)299; SYMS32-NEXT: StabInfoIndex: 0x0300; SYMS32-NEXT: StabSectNum: 0x0301; SYMS64-NEXT: Auxiliary Type: AUX_CSECT (0xFB)302; SYMS-NEXT: }303; SYMS-NEXT: }304; SYMS: ]305 306; DIS: Disassembly of section .text:307; DIS: 00000000 <const_ivar>:308; DIS-NEXT: 0: 00 00 00 23309; DIS-NEXT: 4: 00 00 00 00310 311; DIS: 00000008 <const_llvar>:312; DIS-NEXT: 8: 00 00 00 00313; DIS-NEXT: c: 00 00 00 24314 315; DIS: 00000010 <const_svar>:316; DIS-NEXT: 10: 00 25 00 00317 318; DIS: 00000014 <const_fvar>:319; DIS-NEXT: 14: 44 48 00 00320 321; DIS: 00000018 <const_dvar>:322; DIS-NEXT: 18: 40 8c 20 00323; DIS-NEXT: 1c: 00 00 00 00324 325; DIS: 00000020 <const_over_aligned>:326; DIS-NEXT: 20: 40 8c 20 00327; DIS-NEXT: 24: 00 00 00 00328 329; DIS: 00000028 <const_chrarray>:330; DIS-NEXT: 28: 61 62 63 64331; DIS-NEXT: 2c: 00 00 00 00332 333; DIS: 00000030 <const_dblarr>:334; DIS-NEXT: 30: 3f f0 00 00335; DIS-NEXT: 34: 00 00 00 00336; DIS-NEXT: 38: 40 00 00 00337; DIS-NEXT: 3c: 00 00 00 00338; DIS-NEXT: 40: 40 08 00 00339; DIS-NEXT: 44: 00 00 00 00340; DIS-NEXT: 48: 40 10 00 00341; DIS-NEXT: 4c: 00 00 00 00342