[mips] Correct section alignments and EntrySizes for .bss, .text, .data, .reginfo...
authorDaniel Sanders <daniel.sanders@imgtec.com>
Mon, 14 Jul 2014 14:02:14 +0000 (14:02 +0000)
committerDaniel Sanders <daniel.sanders@imgtec.com>
Mon, 14 Jul 2014 14:02:14 +0000 (14:02 +0000)
Summary:
.bss, .text, and .data are at least 16-byte aligned.
.reginfo is 4-byte aligned and has a 24-byte EntrySize.
.MIPS.abiflags has an 24-byte EntrySize.
.MIPS.options is 8-byte aligned and has 1-byte EntrySize.

Using a 1-byte EntrySize for .MIPS.options seems strange because the
records are neither 1-byte long nor fixed-length but this matches the value
that GAS emits.

Differential Revision: http://reviews.llvm.org/D4487

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212939 91177308-0d34-0410-b5e6-96231b3b80d8

12 files changed:
lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp
test/MC/Mips/elf_reginfo.s
test/MC/Mips/mips32/abiflags.s
test/MC/Mips/mips32r2/abiflags.s
test/MC/Mips/mips64/abiflags.s
test/MC/Mips/mips64r2/abiflags.s
test/MC/Mips/mips_abi_flags_xx.s
test/MC/Mips/mips_abi_flags_xx_set.s
test/MC/Mips/msa/abiflags.s
test/MC/Mips/nooddspreg-cmdarg.s
test/MC/Mips/nooddspreg.s
test/MC/Mips/oddspreg.s

index fbe375b89641ff653a1487e311a1eea5e2a617e6..45683e883ff57a3488591aad8dcd837bea04add0 100644 (file)
@@ -323,13 +323,30 @@ void MipsTargetELFStreamer::finish() {
   MCAssembler &MCA = getStreamer().getAssembler();
   MCContext &Context = MCA.getContext();
   MCStreamer &OS = getStreamer();
+  const MCObjectFileInfo &OFI = *Context.getObjectFileInfo();
   Triple T(STI.getTargetTriple());
   uint64_t Features = STI.getFeatureBits();
 
+  // .bss, .text and .data are always at least 16-byte aligned.
+  MCSectionData &TextSectionData =
+      MCA.getOrCreateSectionData(*OFI.getTextSection());
+  MCSectionData &DataSectionData =
+      MCA.getOrCreateSectionData(*OFI.getDataSection());
+  MCSectionData &BSSSectionData =
+      MCA.getOrCreateSectionData(*OFI.getBSSSection());
+
+  TextSectionData.setAlignment(std::max(16u, TextSectionData.getAlignment()));
+  DataSectionData.setAlignment(std::max(16u, DataSectionData.getAlignment()));
+  BSSSectionData.setAlignment(std::max(16u, BSSSectionData.getAlignment()));
+
   if (T.isArch64Bit() && (Features & Mips::FeatureN64)) {
-    const MCSectionELF *Sec = Context.getELFSection(
-        ".MIPS.options", ELF::SHT_MIPS_OPTIONS,
-        ELF::SHF_ALLOC | ELF::SHF_MIPS_NOSTRIP, SectionKind::getMetadata());
+    // The EntrySize value of 1 seems strange since the records are neither
+    // 1-byte long nor fixed length but it matches the value GAS emits.
+    const MCSectionELF *Sec =
+        Context.getELFSection(".MIPS.options", ELF::SHT_MIPS_OPTIONS,
+                              ELF::SHF_ALLOC | ELF::SHF_MIPS_NOSTRIP,
+                              SectionKind::getMetadata(), 1, "");
+    MCA.getOrCreateSectionData(*Sec).setAlignment(8);
     OS.SwitchSection(Sec);
 
     OS.EmitIntValue(1, 1);  // kind
@@ -346,7 +363,8 @@ void MipsTargetELFStreamer::finish() {
   } else {
     const MCSectionELF *Sec =
         Context.getELFSection(".reginfo", ELF::SHT_MIPS_REGINFO, ELF::SHF_ALLOC,
-                              SectionKind::getMetadata());
+                              SectionKind::getMetadata(), 24, "");
+    MCA.getOrCreateSectionData(*Sec).setAlignment(4);
     OS.SwitchSection(Sec);
 
     OS.EmitIntValue(0, 4); // ri_gprmask
@@ -638,7 +656,7 @@ void MipsTargetELFStreamer::emitMipsAbiFlags() {
   MCStreamer &OS = getStreamer();
   const MCSectionELF *Sec =
       Context.getELFSection(".MIPS.abiflags", ELF::SHT_MIPS_ABIFLAGS,
-                            ELF::SHF_ALLOC, SectionKind::getMetadata());
+                            ELF::SHF_ALLOC, SectionKind::getMetadata(), 24, "");
   MCSectionData &ABIShndxSD = MCA.getOrCreateSectionData(*Sec);
   ABIShndxSD.setAlignment(8);
   OS.SwitchSection(Sec);
index 5e9ddf84d04a0a5e02e571724e930c6ad01a23af..b88607a02d361bd6bf2a6969adf38e0fe3864d0b 100644 (file)
 # check for .MIPS.options
 # CHECK_64:      Sections [
 # CHECK_64:        Section {
-# CHECK_64:          Name: .MIPS.options
+# CHECK_64-LABEL:    Name: .MIPS.options
 # CHECK_64-NEXT:     Type: SHT_MIPS_OPTIONS
 # CHECK_64-NEXT:     Flags [ (0x8000002)
+# CHECK_64:          AddressAlignment: 8
+# CHECK_64:          EntrySize: 1
+# CHECK_64-LABEL:  }
 
 # check for .reginfo
 # CHECK_32:      Sections [
 # CHECK_32:        Section {
-# CHECK_32:          Name: .reginfo
+# CHECK_32-LABEL:    Name: .reginfo
 # CHECK_32-NEXT:     Type:  SHT_MIPS_REGINFO
 # CHECK_32-NEXT:     Flags [ (0x2)
+# CHECK_32:          AddressAlignment: 4
+# CHECK_32:          EntrySize: 24
+# CHECK_32-LABEL:  }
index 3f568648037b3e76a9d1e3de8841a22fc01f1fd9..dd772c0ba5a7bc53aa8f332898766335a6a760f2 100644 (file)
@@ -8,27 +8,26 @@
 # CHECK-ASM: .module fp=32
 
 # Checking if the Mips.abiflags were correctly emitted.
-# CHECK-OBJ:  Section {
-# CHECK-OBJ:    Index: 5
-# CHECK-OBJ:    Name: .MIPS.abiflags (12)
-# CHECK-OBJ:    Type: SHT_MIPS_ABIFLAGS (0x7000002A)
-# CHECK-OBJ:     Flags [ (0x2)
-# CHECK-OBJ:      SHF_ALLOC (0x2)
-# CHECK-OBJ:    ]
-# CHECK-OBJ:    Address: 0x0
-# CHECK-OBJ:    Offset: 0x50
-# CHECK-OBJ:    Size: 24
-# CHECK-OBJ:    Link: 0
-# CHECK-OBJ:    Info: 0
-# CHECK-OBJ:    AddressAlignment: 8
-# CHECK-OBJ:    EntrySize: 0
-# CHECK-OBJ:    Relocations [
-# CHECK-OBJ:    ]
-# CHECK-OBJ:    SectionData (
-# CHECK-OBJ:      0000: 00002001 01010001 00000000 00000000  |.. .............|
-# CHECK-OBJ:      0010: 00000001 00000000                    |........|
-# CHECK-OBJ:    )
-# CHECK-OBJ:  }
+# CHECK-OBJ:       Section {
+# CHECK-OBJ:         Index: 5
+# CHECK-OBJ-LABEL:   Name: .MIPS.abiflags (12)
+# CHECK-OBJ:         Type: SHT_MIPS_ABIFLAGS (0x7000002A)
+# CHECK-OBJ:          Flags [ (0x2)
+# CHECK-OBJ:           SHF_ALLOC (0x2)
+# CHECK-OBJ:         ]
+# CHECK-OBJ:         Address: 0x0
+# CHECK-OBJ:         Size: 24
+# CHECK-OBJ:         Link: 0
+# CHECK-OBJ:         Info: 0
+# CHECK-OBJ:         AddressAlignment: 8
+# CHECK-OBJ:         EntrySize: 24
+# CHECK-OBJ:         Relocations [
+# CHECK-OBJ:         ]
+# CHECK-OBJ:         SectionData (
+# CHECK-OBJ:           0000: 00002001 01010001 00000000 00000000  |.. .............|
+# CHECK-OBJ:           0010: 00000001 00000000                    |........|
+# CHECK-OBJ:         )
+# CHECK-OBJ-LABEL: }
 
         .module fp=32
 
index 228ba57e8b8042e326c1f3e99563d52fd5a81348..e3bb15bdddeebddcde687a52a9c5293701dc8c80 100644 (file)
@@ -9,27 +9,26 @@
 # CHECK-ASM: .set fp=64
 
 # Checking if the Mips.abiflags were correctly emitted.
-# CHECK-OBJ:  Section {
-# CHECK-OBJ:    Index: 5
-# CHECK-OBJ:    Name: .MIPS.abiflags (12)
-# CHECK-OBJ:    Type: SHT_MIPS_ABIFLAGS (0x7000002A)
-# CHECK-OBJ:     Flags [ (0x2)
-# CHECK-OBJ:      SHF_ALLOC (0x2)
-# CHECK-OBJ:    ]
-# CHECK-OBJ:    Address: 0x0
-# CHECK-OBJ:    Offset: 0x50
-# CHECK-OBJ:    Size: 24
-# CHECK-OBJ:    Link: 0
-# CHECK-OBJ:    Info: 0
-# CHECK-OBJ:    AddressAlignment: 8
-# CHECK-OBJ:    EntrySize: 0
-# CHECK-OBJ:    Relocations [
-# CHECK-OBJ:    ]
-# CHECK-OBJ:    SectionData (
-# CHECK-OBJ:      0000: 00002002 01010001 00000000 00000000  |.. .............|
-# CHECK-OBJ:      0010: 00000001 00000000                    |........|
-# CHECK-OBJ:    )
-# CHECK-OBJ:  }
+# CHECK-OBJ:       Section {
+# CHECK-OBJ:         Index: 5
+# CHECK-OBJ-LABEL:   Name: .MIPS.abiflags (12)
+# CHECK-OBJ:         Type: SHT_MIPS_ABIFLAGS (0x7000002A)
+# CHECK-OBJ:          Flags [ (0x2)
+# CHECK-OBJ:           SHF_ALLOC (0x2)
+# CHECK-OBJ:         ]
+# CHECK-OBJ:         Address: 0x0
+# CHECK-OBJ:         Size: 24
+# CHECK-OBJ:         Link: 0
+# CHECK-OBJ:         Info: 0
+# CHECK-OBJ:         AddressAlignment: 8
+# CHECK-OBJ:         EntrySize: 24
+# CHECK-OBJ:         Relocations [
+# CHECK-OBJ:         ]
+# CHECK-OBJ:         SectionData (
+# CHECK-OBJ:           0000: 00002002 01010001 00000000 00000000  |.. .............|
+# CHECK-OBJ:           0010: 00000001 00000000                    |........|
+# CHECK-OBJ:         )
+# CHECK-OBJ-LABEL: }
 
         .module fp=32
         .set fp=64
index 0b4bad0921026e26cbb25c80131bd6af93fe97cc..38b7a454e8f86bee24e537380b165444c4f5b81d 100644 (file)
@@ -8,27 +8,26 @@
 # CHECK-ASM: .module fp=64
 
 # Checking if the Mips.abiflags were correctly emitted.
-# CHECK-OBJ:  Section {
-# CHECK-OBJ:    Index: 5
-# CHECK-OBJ:    Name: .MIPS.abiflags (12)
-# CHECK-OBJ:    Type: SHT_MIPS_ABIFLAGS (0x7000002A)
-# CHECK-OBJ:     Flags [ (0x2)
-# CHECK-OBJ:      SHF_ALLOC (0x2)
-# CHECK-OBJ:    ]
-# CHECK-OBJ:    Address: 0x0
-# CHECK-OBJ:    Offset: 0x50
-# CHECK-OBJ:    Size: 24
-# CHECK-OBJ:    Link: 0
-# CHECK-OBJ:    Info: 0
-# CHECK-OBJ:    AddressAlignment: 8
-# CHECK-OBJ:    EntrySize: 0
-# CHECK-OBJ:    Relocations [
-# CHECK-OBJ:    ]
-# CHECK-OBJ:    SectionData (
-# CHECK-OBJ:      0000: 00004001 02020001 00000000 00000000  |..@.............|
-# CHECK-OBJ:      0010: 00000001 00000000                    |........|
-# CHECK-OBJ:    )
-# CHECK-OBJ:  }
+# CHECK-OBJ:       Section {
+# CHECK-OBJ:         Index: 5
+# CHECK-OBJ-LABEL:   Name: .MIPS.abiflags (12)
+# CHECK-OBJ:         Type: SHT_MIPS_ABIFLAGS (0x7000002A)
+# CHECK-OBJ:          Flags [ (0x2)
+# CHECK-OBJ:           SHF_ALLOC (0x2)
+# CHECK-OBJ:         ]
+# CHECK-OBJ:         Address: 0x0
+# CHECK-OBJ:         Size: 24
+# CHECK-OBJ:         Link: 0
+# CHECK-OBJ:         Info: 0
+# CHECK-OBJ:         AddressAlignment: 8
+# CHECK-OBJ:         EntrySize: 24
+# CHECK-OBJ:         Relocations [
+# CHECK-OBJ:         ]
+# CHECK-OBJ:         SectionData (
+# CHECK-OBJ:           0000: 00004001 02020001 00000000 00000000  |..@.............|
+# CHECK-OBJ:           0010: 00000001 00000000                    |........|
+# CHECK-OBJ:         )
+# CHECK-OBJ-LABEL: }
 
         .module fp=64
 
index 82afbbba93533ec7b16555f3d12275d38312a59b..02a91ee4ab8a06926704b7e34f93d447c1b1ff76 100644 (file)
@@ -8,27 +8,26 @@
 # CHECK-ASM: .module fp=64
 
 # Checking if the Mips.abiflags were correctly emitted.
-# CHECK-OBJ:  Section {
-# CHECK-OBJ:    Index: 5
-# CHECK-OBJ:    Name: .MIPS.abiflags (12)
-# CHECK-OBJ:    Type: SHT_MIPS_ABIFLAGS (0x7000002A)
-# CHECK-OBJ:     Flags [ (0x2)
-# CHECK-OBJ:      SHF_ALLOC (0x2)
-# CHECK-OBJ:    ]
-# CHECK-OBJ:    Address: 0x0
-# CHECK-OBJ:    Offset: 0x50
-# CHECK-OBJ:    Size: 24
-# CHECK-OBJ:    Link: 0
-# CHECK-OBJ:    Info: 0
-# CHECK-OBJ:    AddressAlignment: 8
-# CHECK-OBJ:    EntrySize: 0
-# CHECK-OBJ:    Relocations [
-# CHECK-OBJ:    ]
-# CHECK-OBJ:    SectionData (
-# CHECK-OBJ:      0000: 00004002 02020001 00000000 00000000  |..@.............|
-# CHECK-OBJ:      0010: 00000001 00000000                    |........|
-# CHECK-OBJ:    )
-# CHECK-OBJ:  }
+# CHECK-OBJ:       Section {
+# CHECK-OBJ:         Index: 5
+# CHECK-OBJ-LABEL:   Name: .MIPS.abiflags (12)
+# CHECK-OBJ:         Type: SHT_MIPS_ABIFLAGS (0x7000002A)
+# CHECK-OBJ:          Flags [ (0x2)
+# CHECK-OBJ:           SHF_ALLOC (0x2)
+# CHECK-OBJ:         ]
+# CHECK-OBJ:         Address: 0x0
+# CHECK-OBJ:         Size: 24
+# CHECK-OBJ:         Link: 0
+# CHECK-OBJ:         Info: 0
+# CHECK-OBJ:         AddressAlignment: 8
+# CHECK-OBJ:         EntrySize: 24
+# CHECK-OBJ:         Relocations [
+# CHECK-OBJ:         ]
+# CHECK-OBJ:         SectionData (
+# CHECK-OBJ:           0000: 00004002 02020001 00000000 00000000  |..@.............|
+# CHECK-OBJ:           0010: 00000001 00000000                    |........|
+# CHECK-OBJ:         )
+# CHECK-OBJ-LABEL: }
 
         .module fp=64
 
index b8416fc24541f38d8ee33b5d7fa7f0d95a244d9a..9192d0c4800b2cc4d77844b75f00433a850e3466 100644 (file)
@@ -8,27 +8,26 @@
 # CHECK-ASM: .module fp=xx
 
 # Checking if the Mips.abiflags were correctly emitted.
-# CHECK-OBJ:  Section {
-# CHECK-OBJ:    Index: 5
-# CHECK-OBJ:    Name: .MIPS.abiflags (12)
-# CHECK-OBJ:    Type: SHT_MIPS_ABIFLAGS (0x7000002A)
-# CHECK-OBJ:     Flags [ (0x2)
-# CHECK-OBJ:      SHF_ALLOC (0x2)
-# CHECK-OBJ:    ]
-# CHECK-OBJ:    Address: 0x0
-# CHECK-OBJ:    Offset: 0x50
-# CHECK-OBJ:    Size: 24
-# CHECK-OBJ:    Link: 0
-# CHECK-OBJ:    Info: 0
-# CHECK-OBJ:    AddressAlignment: 8
-# CHECK-OBJ:    EntrySize: 0
-# CHECK-OBJ:    Relocations [
-# CHECK-OBJ:    ]
-# CHECK-OBJ:    SectionData (
-# CHECK-OBJ:      0000: 00002001 01010005 00000000 00000000  |.. .............|
-# CHECK-OBJ:      0010: 00000001 00000000                    |........|
-# CHECK-OBJ:    )
-# CHECK-OBJ:  }
+# CHECK-OBJ:       Section {
+# CHECK-OBJ:         Index: 5
+# CHECK-OBJ-LABEL:   Name: .MIPS.abiflags (12)
+# CHECK-OBJ:         Type: SHT_MIPS_ABIFLAGS (0x7000002A)
+# CHECK-OBJ:          Flags [ (0x2)
+# CHECK-OBJ:           SHF_ALLOC (0x2)
+# CHECK-OBJ:         ]
+# CHECK-OBJ:         Address: 0x0
+# CHECK-OBJ:         Size: 24
+# CHECK-OBJ:         Link: 0
+# CHECK-OBJ:         Info: 0
+# CHECK-OBJ:         AddressAlignment: 8
+# CHECK-OBJ:         EntrySize: 24
+# CHECK-OBJ:         Relocations [
+# CHECK-OBJ:         ]
+# CHECK-OBJ:         SectionData (
+# CHECK-OBJ:           0000: 00002001 01010005 00000000 00000000  |.. .............|
+# CHECK-OBJ:           0010: 00000001 00000000                    |........|
+# CHECK-OBJ:         )
+# CHECK-OBJ-LABEL: }
 
         .module fp=xx
 
index 0c2d9bb7e958cc385332320d9f3e5c0b0d22d523..a548972db0d6c16e6d5052c5de76921c99161248 100644 (file)
@@ -9,27 +9,26 @@
 # CHECK-ASM: .set    fp=64
 
 # Checking if the Mips.abiflags were correctly emitted.
-# CHECK-OBJ:  Section {
-# CHECK-OBJ:    Index: 5
-# CHECK-OBJ:    Name: .MIPS.abiflags (12)
-# CHECK-OBJ:    Type: SHT_MIPS_ABIFLAGS (0x7000002A)
-# CHECK-OBJ:     Flags [ (0x2)
-# CHECK-OBJ:      SHF_ALLOC (0x2)
-# CHECK-OBJ:    ]
-# CHECK-OBJ:    Address: 0x0
-# CHECK-OBJ:    Offset: 0x50
-# CHECK-OBJ:    Size: 24
-# CHECK-OBJ:    Link: 0
-# CHECK-OBJ:    Info: 0
-# CHECK-OBJ:    AddressAlignment: 8
-# CHECK-OBJ:    EntrySize: 0
-# CHECK-OBJ:    Relocations [
-# CHECK-OBJ:    ]
-# CHECK-OBJ:    SectionData (
-# CHECK-OBJ:      0000: 00002001 01010005 00000000 00000000  |.. .............|
-# CHECK-OBJ:      0010: 00000001 00000000                    |........|
-# CHECK-OBJ:    )
-# CHECK-OBJ:  }
+# CHECK-OBJ:       Section {
+# CHECK-OBJ:         Index: 5
+# CHECK-OBJ-LABEL:   Name: .MIPS.abiflags (12)
+# CHECK-OBJ:         Type: SHT_MIPS_ABIFLAGS (0x7000002A)
+# CHECK-OBJ:          Flags [ (0x2)
+# CHECK-OBJ:           SHF_ALLOC (0x2)
+# CHECK-OBJ:         ]
+# CHECK-OBJ:         Address: 0x0
+# CHECK-OBJ:         Size: 24
+# CHECK-OBJ:         Link: 0
+# CHECK-OBJ:         Info: 0
+# CHECK-OBJ:         AddressAlignment: 8
+# CHECK-OBJ:         EntrySize: 24
+# CHECK-OBJ:         Relocations [
+# CHECK-OBJ:         ]
+# CHECK-OBJ:         SectionData (
+# CHECK-OBJ:           0000: 00002001 01010005 00000000 00000000  |.. .............|
+# CHECK-OBJ:           0010: 00000001 00000000                    |........|
+# CHECK-OBJ:         )
+# CHECK-OBJ-LABEL: }
 
         .module fp=xx
         .set    fp=64
index 7856447f0095bbdf5ec1358522002606a6e234dc..136c035593e41ad169a5e6afb467c008f165b748 100644 (file)
@@ -9,27 +9,26 @@
 # CHECK-ASM: .set fp=64
 
 # Checking if the Mips.abiflags were correctly emitted.
-# CHECK-OBJ:  Section {
-# CHECK-OBJ:    Index: 5
-# CHECK-OBJ:    Name: .MIPS.abiflags (12)
-# CHECK-OBJ:    Type: SHT_MIPS_ABIFLAGS (0x7000002A)
-# CHECK-OBJ:     Flags [ (0x2)
-# CHECK-OBJ:      SHF_ALLOC (0x2)
-# CHECK-OBJ:    ]
-# CHECK-OBJ:    Address: 0x0
-# CHECK-OBJ:    Offset: 0x50
-# CHECK-OBJ:    Size: 24
-# CHECK-OBJ:    Link: 0
-# CHECK-OBJ:    Info: 0
-# CHECK-OBJ:    AddressAlignment: 8
-# CHECK-OBJ:    EntrySize: 0
-# CHECK-OBJ:    Relocations [
-# CHECK-OBJ:    ]
-# CHECK-OBJ:    SectionData (
-# CHECK-OBJ:      0000: 00002002 01030001 00000000 00000200  |.. .............|
-# CHECK-OBJ:      0010: 00000001 00000000                    |........|
-# CHECK-OBJ:    )
-# CHECK-OBJ:  }
+# CHECK-OBJ:       Section {
+# CHECK-OBJ:         Index: 5
+# CHECK-OBJ-LABEL:   Name: .MIPS.abiflags (12)
+# CHECK-OBJ:         Type: SHT_MIPS_ABIFLAGS (0x7000002A)
+# CHECK-OBJ:          Flags [ (0x2)
+# CHECK-OBJ:           SHF_ALLOC (0x2)
+# CHECK-OBJ:         ]
+# CHECK-OBJ:         Address: 0x0
+# CHECK-OBJ:         Size: 24
+# CHECK-OBJ:         Link: 0
+# CHECK-OBJ:         Info: 0
+# CHECK-OBJ:         AddressAlignment: 8
+# CHECK-OBJ:         EntrySize: 24
+# CHECK-OBJ:         Relocations [
+# CHECK-OBJ:         ]
+# CHECK-OBJ:         SectionData (
+# CHECK-OBJ:           0000: 00002002 01030001 00000000 00000200  |.. .............|
+# CHECK-OBJ:           0010: 00000001 00000000                    |........|
+# CHECK-OBJ:         )
+# CHECK-OBJ-LABEL: }
 
         .module fp=32
         .set fp=64
index 993c630c13ab4cc240565f6b3c376adf9b869acf..52b040e96f12d7037294ebc09a1ce192ee3728cf 100644 (file)
 # CHECK-ASM-NOT: .module nooddspreg
 
 # Checking if the Mips.abiflags were correctly emitted.
-# CHECK-OBJ:  Section {
-# CHECK-OBJ:    Index: 5
-# CHECK-OBJ:    Name: .MIPS.abiflags (12)
-# CHECK-OBJ:    Type: SHT_MIPS_ABIFLAGS (0x7000002A)
-# CHECK-OBJ:     Flags [ (0x2)
-# CHECK-OBJ:      SHF_ALLOC (0x2)
-# CHECK-OBJ:    ]
-# CHECK-OBJ:    Address: 0x0
-# CHECK-OBJ:    Offset: 0x50
-# CHECK-OBJ:    Size: 24
-# CHECK-OBJ:    Link: 0
-# CHECK-OBJ:    Info: 0
-# CHECK-OBJ:    AddressAlignment: 8
-# CHECK-OBJ:    EntrySize: 0
-# CHECK-OBJ:    Relocations [
-# CHECK-OBJ:    ]
-# CHECK-OBJ:    SectionData (
-# CHECK-OBJ:      0000: 00002001 01020007 00000000 00000000  |.. .............|
-# CHECK-OBJ:      0010: 00000000 00000000                    |........|
-# CHECK-OBJ:    )
-# CHECK-OBJ:  }
+# CHECK-OBJ:       Section {
+# CHECK-OBJ:         Index: 5
+# CHECK-OBJ-LABEL:   Name: .MIPS.abiflags (12)
+# CHECK-OBJ:         Type: SHT_MIPS_ABIFLAGS (0x7000002A)
+# CHECK-OBJ:          Flags [ (0x2)
+# CHECK-OBJ:           SHF_ALLOC (0x2)
+# CHECK-OBJ:         ]
+# CHECK-OBJ:         Address: 0x0
+# CHECK-OBJ:         Size: 24
+# CHECK-OBJ:         Link: 0
+# CHECK-OBJ:         Info: 0
+# CHECK-OBJ:         AddressAlignment: 8
+# CHECK-OBJ:         EntrySize: 24
+# CHECK-OBJ:         Relocations [
+# CHECK-OBJ:         ]
+# CHECK-OBJ:         SectionData (
+# CHECK-OBJ:           0000: 00002001 01020007 00000000 00000000  |.. .............|
+# CHECK-OBJ:           0010: 00000000 00000000                    |........|
+# CHECK-OBJ:         )
+# CHECK-OBJ-LABEL: }
 
 # INVALID: ERROR: -mno-odd-spreg requires the O32 ABI
 
index 10cd1ac068fc8422c41e3d629395465fca8bef14..f268ef48297d1efacc3c815d4dae3c29218fa923 100644 (file)
 # CHECK-ASM: .module nooddspreg
 
 # Checking if the Mips.abiflags were correctly emitted.
-# CHECK-OBJ:  Section {
-# CHECK-OBJ:    Index: 5
-# CHECK-OBJ:    Name: .MIPS.abiflags (12)
-# CHECK-OBJ:    Type: SHT_MIPS_ABIFLAGS (0x7000002A)
-# CHECK-OBJ:     Flags [ (0x2)
-# CHECK-OBJ:      SHF_ALLOC (0x2)
-# CHECK-OBJ:    ]
-# CHECK-OBJ:    Address: 0x0
-# CHECK-OBJ:    Offset: 0x50
-# CHECK-OBJ:    Size: 24
-# CHECK-OBJ:    Link: 0
-# CHECK-OBJ:    Info: 0
-# CHECK-OBJ:    AddressAlignment: 8
-# CHECK-OBJ:    EntrySize: 0
-# CHECK-OBJ:    Relocations [
-# CHECK-OBJ:    ]
-# CHECK-OBJ:    SectionData (
-# CHECK-OBJ:      0000: 00002001 01020007 00000000 00000000  |.. .............|
-# CHECK-OBJ:      0010: 00000000 00000000                    |........|
-# CHECK-OBJ:    )
-# CHECK-OBJ:  }
+# CHECK-OBJ:       Section {
+# CHECK-OBJ:         Index: 5
+# CHECK-OBJ-LABEL:   Name: .MIPS.abiflags (12)
+# CHECK-OBJ:         Type: SHT_MIPS_ABIFLAGS (0x7000002A)
+# CHECK-OBJ:          Flags [ (0x2)
+# CHECK-OBJ:           SHF_ALLOC (0x2)
+# CHECK-OBJ:         ]
+# CHECK-OBJ:         Address: 0x0
+# CHECK-OBJ:         Size: 24
+# CHECK-OBJ:         Link: 0
+# CHECK-OBJ:         Info: 0
+# CHECK-OBJ:         AddressAlignment: 8
+# CHECK-OBJ:         EntrySize: 24
+# CHECK-OBJ:         Relocations [
+# CHECK-OBJ:         ]
+# CHECK-OBJ:         SectionData (
+# CHECK-OBJ:           0000: 00002001 01020007 00000000 00000000  |.. .............|
+# CHECK-OBJ:           0010: 00000000 00000000                    |........|
+# CHECK-OBJ:         )
+# CHECK-OBJ-LABEL: }
 
 # INVALID: '.module nooddspreg' requires the O32 ABI
 
index a7b0c4b189ef54d49eeb68c6708ffed8c57412ec..32ba9e0a3f93ce443a410c957e8b2c8e7a8ba1d5 100644 (file)
 # CHECK-ASM: .module oddspreg
 
 # Checking if the Mips.abiflags were correctly emitted.
-# CHECK-OBJ-ALL:  Section {
-# CHECK-OBJ-ALL:    Index: 5
-# CHECK-OBJ-ALL:    Name: .MIPS.abiflags ({{[0-9]+}})
-# CHECK-OBJ-ALL:    Type: SHT_MIPS_ABIFLAGS (0x7000002A)
-# CHECK-OBJ-ALL:     Flags [ (0x2)
-# CHECK-OBJ-ALL:      SHF_ALLOC (0x2)
-# CHECK-OBJ-ALL:    ]
-# CHECK-OBJ-ALL:    Address: 0x0
-# CHECK-OBJ-ALL:    Offset: 0x{{[0-9A-F]+}}
-# CHECK-OBJ-ALL:    Size: 24
-# CHECK-OBJ-ALL:    Link: 0
-# CHECK-OBJ-ALL:    Info: 0
-# CHECK-OBJ-ALL:    AddressAlignment: 8
-# CHECK-OBJ-ALL:    EntrySize: 0
-# CHECK-OBJ-ALL:    Relocations [
-# CHECK-OBJ-ALL:    ]
-# CHECK-OBJ-ALL:    SectionData (
-# CHECK-OBJ-O32:      0000: 00002001 01020006 00000000 00000000  |.. .............|
-# CHECK-OBJ-O32:      0010: 00000001 00000000                    |........|
-# CHECK-OBJ-N32:      0000: 00004001 02020001 00000000 00000000  |..@.............|
-# CHECK-OBJ-N32:      0010: 00000001 00000000                    |........|
-# CHECK-OBJ-N64:      0000: 00004001 02020001 00000000 00000000  |..@.............|
-# CHECK-OBJ-N64:      0010: 00000001 00000000                    |........|
-# CHECK-OBJ-ALL:    )
-# CHECK-OBJ-ALL:  }
+# CHECK-OBJ-ALL:       Section {
+# CHECK-OBJ-ALL:         Index: 5
+# CHECK-OBJ-ALL-LABEL:   Name: .MIPS.abiflags ({{[0-9]+}})
+# CHECK-OBJ-ALL:         Type: SHT_MIPS_ABIFLAGS (0x7000002A)
+# CHECK-OBJ-ALL:          Flags [ (0x2)
+# CHECK-OBJ-ALL:           SHF_ALLOC (0x2)
+# CHECK-OBJ-ALL:         ]
+# CHECK-OBJ-ALL:         Address: 0x0
+# CHECK-OBJ-ALL:         Size: 24
+# CHECK-OBJ-ALL:         Link: 0
+# CHECK-OBJ-ALL:         Info: 0
+# CHECK-OBJ-ALL:         AddressAlignment: 8
+# CHECK-OBJ-ALL:         EntrySize: 24
+# CHECK-OBJ-ALL:         Relocations [
+# CHECK-OBJ-ALL:         ]
+# CHECK-OBJ-ALL:         SectionData (
+# CHECK-OBJ-O32:           0000: 00002001 01020006 00000000 00000000  |.. .............|
+# CHECK-OBJ-O32:           0010: 00000001 00000000                    |........|
+# CHECK-OBJ-N32:           0000: 00004001 02020001 00000000 00000000  |..@.............|
+# CHECK-OBJ-N32:           0010: 00000001 00000000                    |........|
+# CHECK-OBJ-N64:           0000: 00004001 02020001 00000000 00000000  |..@.............|
+# CHECK-OBJ-N64:           0010: 00000001 00000000                    |........|
+# CHECK-OBJ-ALL:         )
+# CHECK-OBJ-ALL-LABEL: }
 
         .module oddspreg
         add.s $f3, $f1, $f5