[PATCH] Support for microMIPS relocations 1/3

Rafael EspĂ­ndola rafael.espindola at gmail.com
Tue Oct 1 11:57:30 PDT 2013

On 1 October 2013 14:50, Jack Carter <Jack.Carter at imgtec.com> wrote:
> There are 2 tools using the same code. Can they both use it correctly? Are the calls through both AsmPrinter and AsmParser going to get a correct result? The long term customer use will be to use direct object emission. To not test it directly is ill advised.
> The only way to be sure is to test the output both of the products, and to test them with independent tools.
> If this will block us from checking in the patch, I will relent for expediency sake, but not testing the output of both tools is basically wrong.

That is *not* the design goal of MC or more generally of the llvm
tests. Driver tests check the -cc1 command line, clang tests check the
emitted llvm, etc.

The exceptions are few. In the case of MC, llc + llvm-mc are designed
to produce the same output as direct emission. The one exception that
I know of is relaxation of multiple instructions that print the same
in a .s.

In the past having direct object emission tests was the most annoying
and brittle part of llvm by far. Now that we have a mature MC
infrastructure we are in a position where we can require that any
direct object emission feature is tested with llvm-mc and any codegen
feature is tested with llc printing assembly. I think we should do so.


More information about the llvm-commits mailing list