<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from text --><style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<div>Hi Rafael, MIPS GCC emits a directive in the .s file for many command line arguments.  So if I compile with -mabicalls, I'm going to see a:
<div>    .set.    abicalls</div>
<div>In the .s file. For integrated-as, I'd set the bit.</div>
<div><br>
</div>
<div>-rich</div>
<br>
<br>
<br>
-------- Original message --------<br>
From: Rafael Espíndola <rafael.espindola@gmail.com> <br>
Date: 10/24/2013 13:31 (GMT-08:00) <br>
To: Vladimir Medic <Vladimir.Medic@imgtec.com> <br>
Cc: Jack Carter <Jack.Carter@imgtec.com>,llvm-commits@cs.uiuc.edu,Jim Grosbach <grosbach@apple.com>,Rich Fuhler <Rich.Fuhler@imgtec.com>
<br>
Subject: Re: [PATCH][AsmParser][MC] Allow asm parser to emit elf header flags <br>
<br>
<br>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText">On 24 October 2013 11:34, Vladimir Medic <Vladimir.Medic@imgtec.com> wrote:<br>
> Hi Rafael,<br>
> I'd just like to clarify one thing:<br>
>>>There is also a helper method emitMipsELFFlags, which in case of AsmStreamer does nothing, and for >>ElfStreamer actual value is emitted to the output.<br>
><br>
>>>This part looks wrong. How would you get the correct flags when using<br>
> l>>lvm-mc to parse an assembly file? If these flag differences are from<br>
>>>command line options (instead of assembly directives) then llvm-mc<br>
>>>should implement equivalent options to the gnu assembler ones. They<br>
>>>should then be mapped to flags that are passed to the target object<br>
>>>streamer constructor (like a isMips16 for example).<br>
> are you referring to the method which sets command line options during the initialization(virtual void emitElfHeaderFlags(MCSubtargetInfo &STI);), is that what you suggest should be moved to MCStreamer class?<br>
<br>
I am referring to emitMipsELFFlags. If there is no .mips_elf_flags<br>
directive is mips assembly, then that is not a good match for the<br>
streamer interface.<br>
<br>
My understanding (please correct if I am wrong), is that the gnu<br>
assembly sets some flags based on command line option. So there is a<br>
-foo option that causes bit number X to be set. Given that, this<br>
should not be a streamer method at all. What should happen is that the<br>
mips target *object* streamer constructor should take foo as an<br>
option. Since option foo is not present on the assembly file, the mips<br>
asm target streamer constructor doesn't need the option.<br>
<br>
Cheers,<br>
Rafael<br>
</div>
</span></font>
</body>
</html>