[LLVMdev] Generate data16 assembly instruction for TLS with PIC

Cameron McInally cameron.mcinally at nyu.edu
Fri Aug 17 09:40:09 PDT 2012


Hey Wei-zhi,

I also had this issue with the X86 backend. And, unfortunately, searching
for the warning did not turn up too much information. My solution was to
emit a raw 0x66 byte in place of the data16 prefix. I believe those are
equivalent and the assembler is much happier about it...

> #if LLVM_31_MERGE
>    SmallString<11> byte;
>    byte = "\t.byte 0x66";
>    OutStreamer.EmitRawText(byte);
>#else /* LLVM_31_MERGE */
>    prefix.setOpcode(X86::DATA16_PREFIX);
>    OutStreamer.EmitInstruction(prefix);
>#endif /* LLVM_31_MERGE */

-Cameron

On Fri, Aug 17, 2012 at 12:27 PM, Wei-zhi Liao <giggle at zillians.com> wrote:
...
>
> I think it is the logic to generate data16 instruction, but I wonder why
> gcc report warning. Is it a LLVM's bug?
> Thanks for your time in advance :D
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120817/93d75f02/attachment.html>


More information about the llvm-dev mailing list