llvm.org GIT mirror llvm / 86b535b
This reverts commit r200064 and r200051. r200064 depends on r200051. r200051 is broken: I tries to replace .mips_hack_elf_flags, which is a good thing, but what it replaces it with is even worse. The new emitMipsELFFlags it adds corresponds to no assembly directive, is not marked as a hack and is not even printed to the .s file. The patch also introduces more uses of hasRawTextSupport. The correct way to remove .mips_hack_elf_flags is to have the mips target streamer handle the default flags (and command line options). That way the same code path is used for asm and obj. The streamer interface should *really* correspond to what is printed in the .s file. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200078 91177308-0d34-0410-b5e6-96231b3b80d8 Rafael Espindola 6 years ago
10 changed file(s) with 130 addition(s) and 216 deletion(s). Raw diff Collapse all Expand all
2020 #include "llvm/MC/MCSubtargetInfo.h"
2121 #include "llvm/MC/MCSymbol.h"
2222 #include "llvm/MC/MCTargetAsmParser.h"
23 #include "llvm/Support/ELF.h"
24 #include "llvm/Support/TargetRegistry.h"
25 #include "llvm/ADT/APInt.h"
2623 #include "llvm/Support/MathExtras.h"
2724 #include "llvm/Support/TargetRegistry.h"
2825
196193
197194 bool isEvaluated(const MCExpr *Expr);
198195 bool parseDirectiveSet();
196 bool parseDirectiveMipsHackELFFlags();
199197 bool parseDirectiveOption();
200198
201199 bool parseSetAtDirective();
258256 // Example: INSERT.B $w0[n], $1 => 16 > n >= 0
259257 bool validateMSAIndex(int Val, int RegKind);
260258
261 // Set ELF flags based on defaults and commandline arguments.
262 void processInitialEFlags();
263
264259 public:
265260 MipsAsmParser(MCSubtargetInfo &sti, MCAsmParser &parser,
266261 const MCInstrInfo &MII)
268263 hasConsumedDollar(false) {
269264 // Initialize the set of available features.
270265 setAvailableFeatures(ComputeAvailableFeatures(STI.getFeatureBits()));
271 processInitialEFlags();
272266 }
273267
274268 MCAsmParser &getParser() const { return Parser; }
24342428 return true;
24352429 }
24362430
2431 bool MipsAsmParser::parseDirectiveMipsHackELFFlags() {
2432 int64_t Flags = 0;
2433 if (Parser.parseAbsoluteExpression(Flags)) {
2434 TokError("unexpected token");
2435 return false;
2436 }
2437
2438 getTargetStreamer().emitMipsHackELFFlags(Flags);
2439 return false;
2440 }
2441
24372442 /// parseDirectiveWord
24382443 /// ::= .word [ expression (, expression)* ]
24392444 bool MipsAsmParser::parseDirectiveWord(unsigned Size, SMLoc L) {
25522557 return false;
25532558 }
25542559
2560 if (IDVal == ".mips_hack_elf_flags")
2561 return parseDirectiveMipsHackELFFlags();
2562
25552563 if (IDVal == ".option")
25562564 return parseDirectiveOption();
25572565
25682576 return true;
25692577 }
25702578
2571 void MipsAsmParser::processInitialEFlags() {
2572 // Start will a clean slate.
2573 unsigned EFlags = 0;
2574 unsigned FeatureBits = STI.getFeatureBits();
2575
2576 // Default settings
2577 EFlags |= ELF::EF_MIPS_NOREORDER | ELF::EF_MIPS_PIC | ELF::EF_MIPS_ABI_O32;
2578
2579 // ISA
2580 if (FeatureBits & Mips::FeatureMips64r2) {
2581 EFlags |= ELF::EF_MIPS_ARCH_64R2;
2582 EFlags &= ~ELF::EF_MIPS_ABI_O32;
2583 } else if (FeatureBits & Mips::FeatureMips64) {
2584 EFlags |= ELF::EF_MIPS_ARCH_64;
2585 EFlags &= ~ELF::EF_MIPS_ABI_O32;
2586 } else if (FeatureBits & Mips::FeatureMips32r2)
2587 EFlags |= ELF::EF_MIPS_ARCH_32R2;
2588 else if (FeatureBits & Mips::FeatureMips32)
2589 EFlags |= ELF::EF_MIPS_ARCH_32;
2590 else if (FeatureBits & Mips::FeatureO32)
2591 EFlags |= ELF::EF_MIPS_ABI_O32; // This is really a zero
2592
2593 // ASE
2594 if (FeatureBits & Mips::FeatureMicroMips)
2595 EFlags |= ELF::EF_MIPS_MICROMIPS;
2596 else if (FeatureBits & Mips::FeatureMips16)
2597 EFlags |= ELF::EF_MIPS_ARCH_ASE_M16;
2598
2599 // ABI
2600 // TODO: n32/eabi
2601
2602 // Linkage model
2603 // TODO: pic/cpic/static
2604
2605 getTargetStreamer().emitMipsELFFlags(EFlags);
2606 }
2607
26082579 extern "C" void LLVMInitializeMipsAsmParser() {
26092580 RegisterMCAsmParser X(TheMipsTarget);
26102581 RegisterMCAsmParser Y(TheMipselTarget);
2020
2121 using namespace llvm;
2222
23 static cl::opt PrintHackDirectives("print-hack-directives",
24 cl::init(false), cl::Hidden);
25
2326 // Pin vtable to this file.
2427 void MipsTargetStreamer::anchor() {}
2528
2629 MipsTargetAsmStreamer::MipsTargetAsmStreamer(formatted_raw_ostream &OS)
2730 : OS(OS) {}
2831
29 void MipsTargetAsmStreamer::emitMipsELFFlags(unsigned Flags) { return; }
32 void MipsTargetAsmStreamer::emitMipsHackELFFlags(unsigned Flags) {
33 if (!PrintHackDirectives)
34 return;
35
36 OS << "\t.mips_hack_elf_flags 0x";
37 OS.write_hex(Flags);
38 OS << '\n';
39 }
3040
3141 void MipsTargetAsmStreamer::emitDirectiveSetMicroMips() {
3242 OS << "\t.set\tmicromips\n";
7484 return static_cast(*Streamer);
7585 }
7686
77 void MipsTargetELFStreamer::emitMipsELFFlags(unsigned Flags) {
87 void MipsTargetELFStreamer::emitMipsHackELFFlags(unsigned Flags) {
7888 MCAssembler &MCA = getStreamer().getAssembler();
7989 MCA.setELFHeaderEFlags(Flags);
8090 }
107107 return;
108108 }
109109
110
110111 MachineBasicBlock::const_instr_iterator I = MI;
111112 MachineBasicBlock::const_instr_iterator E = MI->getParent()->instr_end();
112113
632633
633634 }
634635
635 void MipsAsmPrinter::processInitialEFlags() {
636 // Not having this check would work too, but would have us chew through
637 // code that it doesn't use for RawText.
638 if (OutStreamer.hasRawTextSupport())
639 return;
640
636 static void emitELFHeaderFlagsCG(MipsTargetStreamer &TargetStreamer,
637 const MipsSubtarget &Subtarget) {
641638 // Update e_header flags
642639 unsigned EFlags = 0;
643640
645642 // Currently we assume that -mabicalls is the default.
646643 EFlags |= ELF::EF_MIPS_CPIC;
647644
648 if (Subtarget->inMips16Mode())
645 if (Subtarget.inMips16Mode())
649646 EFlags |= ELF::EF_MIPS_ARCH_ASE_M16;
650647 else
651648 EFlags |= ELF::EF_MIPS_NOREORDER;
652649
653650 // Architecture
654 if (Subtarget->hasMips64r2())
651 if (Subtarget.hasMips64r2())
655652 EFlags |= ELF::EF_MIPS_ARCH_64R2;
656 else if (Subtarget->hasMips64())
653 else if (Subtarget.hasMips64())
657654 EFlags |= ELF::EF_MIPS_ARCH_64;
658 else if (Subtarget->hasMips32r2())
655 else if (Subtarget.hasMips32r2())
659656 EFlags |= ELF::EF_MIPS_ARCH_32R2;
660657 else
661658 EFlags |= ELF::EF_MIPS_ARCH_32;
662659
663 if (Subtarget->inMicroMipsMode())
660 if (Subtarget.inMicroMipsMode())
664661 EFlags |= ELF::EF_MIPS_MICROMIPS;
665662
666663 // ABI
667 if (Subtarget->isABI_O32())
664 if (Subtarget.isABI_O32())
668665 EFlags |= ELF::EF_MIPS_ABI_O32;
669666
670667 // Relocation Model
671 Reloc::Model RM = Subtarget->getRelocationModel();
668 Reloc::Model RM = Subtarget.getRelocationModel();
672669 if (RM == Reloc::PIC_ || RM == Reloc::Default)
673670 EFlags |= ELF::EF_MIPS_PIC;
674671 else if (RM == Reloc::Static)
676673 else
677674 llvm_unreachable("Unsupported relocation model for e_flags");
678675
679 getTargetStreamer().emitMipsELFFlags(EFlags);
676 TargetStreamer.emitMipsHackELFFlags(EFlags);
680677 }
681678
682679 void MipsAsmPrinter::EmitEndOfAsmFile(Module &M) {
683680 // Emit Mips ELF register info
684681 Subtarget->getMReginfo().emitMipsReginfoSectionCG(
685682 OutStreamer, getObjFileLowering(), *Subtarget);
683 emitELFHeaderFlagsCG(getTargetStreamer(), *Subtarget);
686684 }
687685
688686 void MipsAsmPrinter::PrintDebugValueComment(const MachineInstr *MI,
4949 /// pool entries so we can properly mark them as data regions.
5050 bool InConstantPool;
5151
52 // If object output, set initial eflags.
53 // This includes both default and commandline flags that affect the output
54 // ELF header flags.
55 void processInitialEFlags();
5652
5753 public:
5854
6460 : AsmPrinter(TM, Streamer), MCP(0), InConstantPool(false),
6561 MCInstLowering(*this) {
6662 Subtarget = &TM.getSubtarget();
67 processInitialEFlags();
6863 }
6964
7065 virtual const char *getPassName() const {
107102 void EmitStartOfAsmFile(Module &M);
108103 void EmitEndOfAsmFile(Module &M);
109104 void PrintDebugValueComment(const MachineInstr *MI, raw_ostream &OS);
110
111105 };
112106 }
113107
1717 virtual void anchor();
1818
1919 public:
20 virtual void emitMipsELFFlags(unsigned Flags) = 0;
20 virtual void emitMipsHackELFFlags(unsigned Flags) = 0;
2121 virtual void emitDirectiveSetMicroMips() = 0;
2222 virtual void emitDirectiveSetNoMicroMips() = 0;
2323 virtual void emitDirectiveSetMips16() = 0;
3333
3434 public:
3535 MipsTargetAsmStreamer(formatted_raw_ostream &OS);
36 virtual void emitMipsELFFlags(unsigned Flags);
36 virtual void emitMipsHackELFFlags(unsigned Flags);
3737 virtual void emitDirectiveSetMicroMips();
3838 virtual void emitDirectiveSetNoMicroMips();
3939 virtual void emitDirectiveSetMips16();
5555 virtual void emitLabel(MCSymbol *Symbol) LLVM_OVERRIDE;
5656
5757 // FIXME: emitMipsHackELFFlags() will be removed from this class.
58 virtual void emitMipsELFFlags(unsigned Flags);
58 virtual void emitMipsHackELFFlags(unsigned Flags);
5959 virtual void emitDirectiveSetMicroMips();
6060 virtual void emitDirectiveSetNoMicroMips();
6161 virtual void emitDirectiveSetMips16();
+0
-121
test/CodeGen/Mips/elf_eflags.ll less more
None ; This tests for directives that will result in
1 ; ELF EFLAGS setting with direct object.
2
3 ; Non-shared (static) is the absence of pic and or cpic.
4
5 ; EF_MIPS_NOREORDER (0x00000001) is always on by default currently
6 ; EF_MIPS_PIC (0x00000002)
7 ; EF_MIPS_CPIC (0x00000004) - See note below
8 ; EF_MIPS_ABI2 (0x00000020) - n32 not tested yet
9 ; EF_MIPS_ARCH_32 (0x50000000)
10 ; EF_MIPS_ARCH_64 (0x60000000)
11 ; EF_MIPS_ARCH_32R2 (0x70000000)
12 ; EF_MIPS_ARCH_64R2 (0x80000000)
13
14 ; Note that EF_MIPS_CPIC is set by -mabicalls which is the default on Linux
15 ; TODO need to support -mno-abicalls
16
17 ; RUN: llc -mtriple mipsel-unknown-linux -mcpu=mips32 \
18 ; RUN: -relocation-model=static %s -o - | \
19 ; RUN: FileCheck -check-prefix=CHECK-BE32 %s
20 ;
21 ; RUN: llc -mtriple mipsel-unknown-linux -mcpu=mips32 %s -o - | \
22 ; RUN: FileCheck -check-prefix=CHECK-BE32_PIC %s
23 ;
24 ; RUN: llc -mtriple mipsel-unknown-linux -mcpu=mips32r2 \
25 ; RUN: -relocation-model=static %s -o - | \
26 ; RUN: FileCheck -check-prefix=CHECK-BE32R2 %s
27 ;
28 ; RUN: llc -mtriple mipsel-unknown-linux -mcpu=mips32r2 %s -o - | \
29 ; RUN: FileCheck -check-prefix=CHECK-BE32R2_PIC %s
30 ;
31 ; RUN: llc -mtriple mipsel-unknown-linux -mcpu=mips32r2 \
32 ; RUN: -mattr=+micromips -relocation-model=static %s -o - | \
33 ; RUN: FileCheck -check-prefix=CHECK-BE32R2-MICROMIPS %s
34 ;
35 ; RUN: llc -mtriple mipsel-unknown-linux -mcpu=mips32r2 \
36 ; RUN: -mattr=+micromips %s -o - | \
37 ; RUN: FileCheck -check-prefix=CHECK-BE32R2-MICROMIPS_PIC %s
38
39 ; RUN: llc -mtriple mipsel-unknown-linux -mcpu=mips64 \
40 ; RUN: -relocation-model=static %s -o - | \
41 ; RUN: FileCheck -check-prefix=CHECK-BE64 %s
42 ;
43 ; RUN: llc -mtriple mipsel-unknown-linux -mcpu=mips64 %s -o - | \
44 ; RUN: FileCheck -check-prefix=CHECK-BE64_PIC %s
45 ;
46 ; RUN: llc -mtriple mipsel-unknown-linux -mcpu=mips64r2 \
47 ; RUN: -relocation-model=static %s -o - | \
48 ; RUN: FileCheck -check-prefix=CHECK-BE64R2 %s
49 ;
50 ; RUN: llc -mtriple mipsel-unknown-linux -mcpu=mips64r2 %s -o - | \
51 ; RUN: FileCheck -check-prefix=CHECK-BE64R2_PIC %s
52
53 ; RUN: llc -mtriple mipsel-unknown-linux -mcpu=mips32r2 \
54 ; RUN: -mattr=+mips16 -relocation-model=pic %s -o - | \
55 ; RUN: FileCheck -check-prefix=CHECK-LE32R2-MIPS16 %s
56
57 ; 32(R1) bit with NO_REORDER and static
58 ; CHECK-BE32: .abicalls
59 ; CHECK-BE32: .option pic0
60 ; CHECK-BE32: .set noreorder
61 ; TODO: Need .set mips32
62 ;
63 ; 32(R1) bit with NO_REORDER and PIC
64 ; CHECK-BE32_PIC: .abicalls
65 ; CHECK-BE32_PIC: .set noreorder
66 ; TODO: Need .set mips32 and check absence of .option pic0
67 ;
68 ; 32R2 bit with NO_REORDER and static
69 ; CHECK-BE32R2: .abicalls
70 ; CHECK-BE32R2: .option pic0
71 ; CHECK-BE32R2: .set noreorder
72 ; TODO: Need .set mips32r2
73 ;
74 ; 32R2 bit with NO_REORDER and PIC
75 ; CHECK-BE32R2_PIC:.abicalls
76 ; CHECK-BE32R2_PIC:.set noreorder
77 ; TODO: Need .set mips32r2 and check absence of .option pic0
78 ;
79 ; 32R2 bit MICROMIPS with NO_REORDER and static
80 ; CHECK-BE32R2-MICROMIPS: .abicalls
81 ; CHECK-BE32R2-MICROMIPS: .option pic0
82 ; CHECK-BE32R2-MICROMIPS: .set micromips
83 ; CHECK-BE32R2-MICROMIPS: .set noreorder
84 ; TODO: Need .set mips32r2
85 ;
86 ; 32R2 bit MICROMIPS with NO_REORDER and PIC
87 ; CHECK-BE32R2-MICROMIPS_PIC: .abicalls
88 ; CHECK-BE32R2-MICROMIPS_PIC: .set micromips
89 ; CHECK-BE32R2-MICROMIPS_PIC: .set noreorder
90 ; TODO: Need .set mips32r2 and check absence of .option pic0
91 ;
92 ; 64(R1) bit with NO_REORDER and static
93 ; CHECK-BE64: .abicalls
94 ; CHECK-BE64: .set noreorder
95 ; TODO: Need .set mips64 and .option pic0
96 ;
97 ; 64(R1) bit with NO_REORDER and PIC
98 ; CHECK-BE64_PIC: .abicalls
99 ; CHECK-BE64_PIC: .set noreorder
100 ; TODO: Need .set mips64 and check absence of .option pic0
101 ;
102 ; 64R2 bit with NO_REORDER and static
103 ; CHECK-BE64R2: .abicalls
104 ; CHECK-BE64R2: .set noreorder
105 ; TODO: Need .set mips64r2 and .option pic0
106 ;
107 ; 64R2 bit with NO_REORDER and PIC
108 ; CHECK-BE64R2_PIC: .abicalls
109 ; CHECK-BE64R2_PIC: .set noreorder
110 ; TODO: Need .set mips64r2 and check absence of .option pic0
111 ;
112 ; 32R2 bit MIPS16 with PIC
113 ; CHECK-LE32R2-MIPS16: .abicalls
114 ; CHECK-LE32R2-MIPS16: .set mips16
115 ; TODO: Need .set mips32r2 and check absence of .option pic0 and noreorder
116
117 define i32 @main() nounwind {
118 entry:
119 ret i32 0
120 }
+0
-13
test/CodeGen/Mips/elf_st_other.ll less more
None ; This tests value of ELF st_other field for function symbol table entries.
1 ; For microMIPS value should be equal to STO_MIPS_MICROMIPS.
2
3 ; RUN: llc -mtriple mipsel-unknown-linux -mcpu=mips32r2 -mattr=+micromips %s \
4 ; RUN: -o - | FileCheck %s
5
6 define i32 @main() nounwind {
7 entry:
8 ret i32 0
9 }
10
11 ; CHECK: .set micromips
12 ; CHECK: main:
0 ; This tests ELF EFLAGS setting with direct object.
1 ; When the assembler is ready a .s file for it will
2 ; be created.
3
4 ; Non-shared (static) is the absence of pic and or cpic.
5
6 ; EF_MIPS_NOREORDER (0x00000001) is always on by default currently
7 ; EF_MIPS_PIC (0x00000002)
8 ; EF_MIPS_CPIC (0x00000004) - See note below
9 ; EF_MIPS_ABI2 (0x00000020) - n32 not tested yet
10 ; EF_MIPS_ARCH_32 (0x50000000)
11 ; EF_MIPS_ARCH_64 (0x60000000)
12 ; EF_MIPS_ARCH_32R2 (0x70000000)
13 ; EF_MIPS_ARCH_64R2 (0x80000000)
14
15 ; Note that EF_MIPS_CPIC is set by -mabicalls which is the default on Linux
16 ; TODO need to support -mno-abicalls
17
18 ; RUN: llc -mtriple mipsel-unknown-linux -mcpu=mips32 -relocation-model=static %s -print-hack-directives -o - | FileCheck -check-prefix=CHECK-BE32 %s
19 ; RUN: llc -mtriple mipsel-unknown-linux -mcpu=mips32 -print-hack-directives %s -o - | FileCheck -check-prefix=CHECK-BE32_PIC %s
20 ; RUN: llc -mtriple mipsel-unknown-linux -mcpu=mips32r2 -relocation-model=static %s -print-hack-directives -o - | FileCheck -check-prefix=CHECK-BE32R2 %s
21 ; RUN: llc -mtriple mipsel-unknown-linux -mcpu=mips32r2 -print-hack-directives %s -o - | FileCheck -check-prefix=CHECK-BE32R2_PIC %s
22 ; RUN: llc -mtriple mipsel-unknown-linux -mcpu=mips32r2 -mattr=+micromips -relocation-model=static -print-hack-directives %s -o - | FileCheck -check-prefix=CHECK-BE32R2-MICROMIPS %s
23 ; RUN: llc -mtriple mipsel-unknown-linux -mcpu=mips32r2 -mattr=+micromips -print-hack-directives %s -o - | FileCheck -check-prefix=CHECK-BE32R2-MICROMIPS_PIC %s
24
25 ; RUN: llc -mtriple mipsel-unknown-linux -mcpu=mips64 -relocation-model=static %s -print-hack-directives -o - | FileCheck -check-prefix=CHECK-BE64 %s
26 ; RUN: llc -mtriple mipsel-unknown-linux -mcpu=mips64 %s -print-hack-directives -o - | FileCheck -check-prefix=CHECK-BE64_PIC %s
27 ; RUN: llc -mtriple mipsel-unknown-linux -mcpu=mips64r2 -relocation-model=static -print-hack-directives %s -o - | FileCheck -check-prefix=CHECK-BE64R2 %s
28 ; RUN: llc -mtriple mipsel-unknown-linux -mcpu=mips64r2 -print-hack-directives %s -o - | FileCheck -check-prefix=CHECK-BE64R2_PIC %s
29
30 ; RUN: llc -mtriple mipsel-unknown-linux -mcpu=mips32r2 -mattr=+mips16 -relocation-model=pic -print-hack-directives %s -o - | FileCheck -check-prefix=CHECK-LE32R2-MIPS16 %s
31
32 ; 32(R1) bit with NO_REORDER and static
33 ; CHECK-BE32: .mips_hack_elf_flags 0x50001005
34 ;
35 ; 32(R1) bit with NO_REORDER and PIC
36 ; CHECK-BE32_PIC: .mips_hack_elf_flags 0x50001007
37 ;
38 ; 32R2 bit with NO_REORDER and static
39 ; CHECK-BE32R2: .mips_hack_elf_flags 0x70001005
40 ;
41 ; 32R2 bit with NO_REORDER and PIC
42 ; CHECK-BE32R2_PIC: .mips_hack_elf_flags 0x70001007
43 ;
44 ; 32R2 bit MICROMIPS with NO_REORDER and static
45 ; CHECK-BE32R2-MICROMIPS: .mips_hack_elf_flags 0x72001005
46 ;
47 ; 32R2 bit MICROMIPS with NO_REORDER and PIC
48 ; CHECK-BE32R2-MICROMIPS_PIC: .mips_hack_elf_flags 0x72001007
49 ;
50 ; 64(R1) bit with NO_REORDER and static
51 ; CHECK-BE64: .mips_hack_elf_flags 0x60000005
52 ;
53 ; 64(R1) bit with NO_REORDER and PIC
54 ; CHECK-BE64_PIC: .mips_hack_elf_flags 0x60000007
55 ;
56 ; 64R2 bit with NO_REORDER and static
57 ; CHECK-BE64R2: .mips_hack_elf_flags 0x80000005
58 ;
59 ; 64R2 bit with NO_REORDER and PIC
60 ; CHECK-BE64R2_PIC: .mips_hack_elf_flags 0x80000007
61 ;
62 ; 32R2 bit MIPS16 with PIC
63 ; CHECK-LE32R2-MIPS16: .mips_hack_elf_flags 0x74001006
64
65 define i32 @main() nounwind {
66 entry:
67 ret i32 0
68 }
None // RUN: llvm-mc -filetype=obj -triple mipsel-unknown-linux %s -o - | \
1 // RUN: llvm-readobj -h | FileCheck %s
0 // RUN: llvm-mc -filetype=obj -triple mipsel-unknown-linux %s -o -| llvm-readobj -h | FileCheck %s
1 // The initial value will be set at 0x50001003 and
2 // we will override that with the negation of 0x2 (option pic0
3 // the addition of 0x4 (.abicalls)
24
3 // From the commandline and defaults the following should be set:
4 // EF_MIPS_ARCH_32 (0x50000000)
5 // EF_MIPS_ABI_O32 (0x00001000)
6 // EF_MIPS_NOREORDER (0x00000001)
7 // EF_MIPS_PIC (0x00000002)
8
9 // Inline directives should set or unset the following:
10 // EF_MIPS_CPIC (0x00000004) : .abicalls
11 // EF_MIPS_ARCH_ASE_M16 (0x04000000) : .set mips16
12 // The negation of EF_MIPS_PIC : .option pic0
5 .mips_hack_elf_flags 0x50001003
136
147 // CHECK: Flags [ (0x54001005)
158
169 .abicalls
1710
1811 .option pic0
19
12
13 // Set EF_MIPS_ARCH_ASE_M16 (0x04000000)
2014 .set mips16
0 ; This tests value of ELF st_other field for function symbol table entries.
1 ; For microMIPS value should be equal to STO_MIPS_MICROMIPS.
2
3 ; RUN: llc -mtriple mipsel-unknown-linux -mcpu=mips32r2 -mattr=+micromips -print-hack-directives %s -o - | FileCheck %s
4
5 define i32 @main() nounwind {
6 entry:
7 ret i32 0
8 }
9
10 ; CHECK: .set micromips
11 ; CHECK: main: