[llvm-commits] [llvm] r163287 - in /llvm/trunk/lib/Target/Mips: CMakeLists.txt MipsAsmPrinter.cpp MipsDirectObjLower.cpp MipsDirectObjLower.h MipsMCInstLower.cpp MipsMCInstLower.h

Rafael EspĂ­ndola rafael.espindola at gmail.com
Thu Sep 13 18:09:46 PDT 2012


On 5 September 2012 22:31, Jack Carter <jcarter at mips.com> wrote:
> Author: jacksprat
> Date: Wed Sep  5 21:31:34 2012
> New Revision: 163287
>
> URL: http://llvm.org/viewvc/llvm-project?rev=163287&view=rev
> Log:
> There are some Mips instructions that are lowered by the
> assembler such as shifts greater than 32. In the case
> of direct object, the code gen needs to do this lowering
> since the assembler is not involved.
>
> With the advent of the llvm-mc assembler, it also needs
> to do the same lowering.
>
> This patch makes that specific lowering code accessible
> to both the direct object output and the assembler.
>
> This patch does not affect generated output.

Has this patch been reviewed? It doesn't look like the best solution.
If I understand it correctly, there is a pseudo instruction that the
mips assembler turns into a real instruction. This looks really
similar to the .cfi pseudo instructions. The way we handle them is

* Codegen just uses a regular MCStreamer interface to print the pseudo
instruction.
* The Asm streamer prints the text representation of the pseudo instruction.
* The object streamer expands it into the "real stuff".

The user observed difference is that "clang -S" uses the pseudo
instruction, which is a good thing, no?

Cheers,
Rafael



More information about the llvm-commits mailing list