<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>

<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#ffffff" text="#000000">
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
Hello,<br>
<br>
This bug affects all LLVM versions from 2.6 to trunk :<br>
<a href="http://llvm.org/bugs/show_bug.cgi?id=5081">http://llvm.org/bugs/show_bug.cgi?id=5081</a><br>
<br>
The workaround I found is to add this :<br>
<br>
Index: lib/Target/X86/X86Instr64bit.td<br>
===================================================================<br>
--- lib/Target/X86/X86Instr64bit.td     (revision 105882)<br>
+++ lib/Target/X86/X86Instr64bit.td     (working copy)<br>
@@ -1832,6 +1832,8 @@<br>
           (MOV64ri64i32 tjumptable  :$dst)>,
Requires<[SmallCode]>;<br>
 def : Pat<(i64 (X86Wrapper tglobaladdr :$dst)),<br>
           (MOV64ri64i32 tglobaladdr :$dst)>,
Requires<[SmallCode]>;<br>
+def : Pat<(i64 (X86Wrapper tglobaltlsaddr :$dst)),<br>
+          (MOV64ri32 tglobaltlsaddr :$dst)>,
Requires<[SmallCode]>;<br>
 def : Pat<(i64 (X86Wrapper texternalsym:$dst)),<br>
           (MOV64ri64i32 texternalsym:$dst)>,
Requires<[SmallCode]>;<br>
 def : Pat<(i64 (X86Wrapper tblockaddress:$dst)),<br>
<br>
Unfortunately, I am 100% confident with this modification since I am
not an expert of LLVM and I doubt a bit about the conversion for 32 bit
to 64bit.<br>
<br>
If someone could approve it or help me with this bug it will be
wonderful.<br>
<br>
Thank you,<br>
Patrick Marlier.<br>
<br>
</body>
</html>