[PATCH] D20109: Add support for Code16GCC

Nirav Dave via llvm-commits llvm-commits at lists.llvm.org
Tue May 10 10:04:48 PDT 2016


niravd added a comment.

In http://reviews.llvm.org/D20109#425880, @dwmw2 wrote:

> Hm, why? We already added -m16 support to both GCC and Clang. So why would anyone use .code16gcc any more? It's just legacy.




> And the *only* reason you'd use it is by putting asm(".code16gcc") at the start of a C file (which has problems with ensuring it's *first* in the asm output, which is why -m16 is so much better even in GCC). And didn't I see separately you forbade inline asm from leaving the assembler in a different mode to the one it starts in?


Agreed. It's not particularlly worthwhile as one could rewrite the code. Further, that one use example (asm(".code16gcc")) doesn't do anything as we do not preserve modes changes from inline assembly (which is the only reasonable way to deal with it persistant inline asm changes) (see: http://reviews.llvm.org/D20067). The only thing this does is let the integrated assembler automatically do the rewriting.


http://reviews.llvm.org/D20109





More information about the llvm-commits mailing list