<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Oct 5, 2013 at 5:45 PM, Richard Mitton <span dir="ltr"><<a href="mailto:richard@codersnotes.com" target="_blank">richard@codersnotes.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">It's better without the *user in the switch, as the code that calls it will then just print 'invalid opcode %x' or whatever, as opposed to right now, where it knows about DW_OP_lo_user+0, but not any other user OPs (DW_OP_lo_user+N), which is silly.<br>
<br>
I don't think there's anything that really uses this much already, but I'll see if I can figure something out to test it with and the update the patch<br></blockquote><div><br></div><div>When we print assembly (rather than the usual debug info of emitting an object file and then using llvm-dwarfdump) we annotate the assembly with comments - but thinking about it, I don't think we annotate DWARF expressions/operators/etc, so this probably isn't visible. I wonder if we call the OperationEncodingString at all.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
.<div class="HOEnZb"><div class="h5"><br>
<br>
Eric Christopher wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Should dump differently I'd have thought. Also don't want to delete<br>
the DW_OP_*_user text I'd think.<br>
<br>
-eric<br>
<br>
On Sat, Oct 5, 2013 at 2:33 PM, Richard Mitton<<a href="mailto:richard@codersnotes.com" target="_blank">richard@codersnotes.com</a><u></u>> wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
No functionality change.<br>
<br>
</blockquote>
Nothing to test! :)<br>
<br>
<br>
<br>
Eric Christopher wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Testcase? :)<br>
<br>
-eric<br>
<br>
On Sat, Oct 5, 2013 at 11:19 AM, Richard Mitton<<a href="mailto:richard@codersnotes.com" target="_blank">richard@codersnotes.com</a><u></u>><br>
wrote:<br>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Formally added an explicit enum for DWARF TLS support. No functionality<br>
change.<br>
<br>
<br>
<a href="http://llvm-reviews.chandlerc.com/D1845" target="_blank">http://llvm-reviews.chandlerc.<u></u>com/D1845</a><br>
<br>
Files:<br>
include/llvm/Support/Dwarf.h<br>
lib/CodeGen/AsmPrinter/<u></u>DwarfCompileUnit.cpp<br>
lib/Support/Dwarf.cpp<br>
<br>
Index: include/llvm/Support/Dwarf.h<br>
==============================<u></u>==============================<u></u>=======<br>
--- include/llvm/Support/Dwarf.h<br>
+++ include/llvm/Support/Dwarf.h<br>
@@ -486,6 +486,9 @@<br>
DW_OP_lo_user = 0xe0,<br>
DW_OP_hi_user = 0xff,<br>
<br>
+ // Extensions for GNU-style thread-local storage.<br>
+ DW_OP_GNU_push_tls_address = 0xe0,<br>
+<br>
// Extensions for Fission proposal.<br>
DW_OP_GNU_addr_index = 0xfb,<br>
DW_OP_GNU_const_index = 0xfc,<br>
Index: lib/CodeGen/AsmPrinter/<u></u>DwarfCompileUnit.cpp<br>
==============================<u></u>==============================<u></u>=======<br>
--- lib/CodeGen/AsmPrinter/<u></u>DwarfCompileUnit.cpp<br>
+++ lib/CodeGen/AsmPrinter/<u></u>DwarfCompileUnit.cpp<br>
@@ -1513,14 +1513,15 @@<br>
// 1) Start with a constNu of the appropriate pointer size<br>
addUInt(Block, 0, dwarf::DW_FORM_data1,<br>
PointerSize == 4 ? dwarf::DW_OP_const4u :<br>
dwarf::DW_OP_const8u);<br>
- // 2) containing the (relocated) address of the TLS variable<br>
+ // 2) containing the (relocated) offset of the TLS variable<br>
+ // within the module's TLS block.<br>
addExpr(Block, 0, dwarf::DW_FORM_udata, Expr);<br>
} else {<br>
addUInt(Block, 0, dwarf::DW_FORM_data1,<br>
dwarf::DW_OP_GNU_const_index);<br>
addUInt(Block, 0, dwarf::DW_FORM_udata,<br>
DU->getAddrPoolIndex(Expr));<br>
}<br>
- // 3) followed by a custom OP to tell the debugger about TLS<br>
(presumably)<br>
- addUInt(Block, 0, dwarf::DW_FORM_data1, dwarf::DW_OP_lo_user);<br>
+ // 3) followed by a custom OP to make the debugger do a TLS<br>
lookup.<br>
+ addUInt(Block, 0, dwarf::DW_FORM_data1,<br>
dwarf::DW_OP_GNU_push_tls_<u></u>address);<br>
} else<br>
addOpAddress(Block, Sym);<br>
// Do not create specification DIE if context is either compile<br>
unit<br>
Index: lib/Support/Dwarf.cpp<br>
==============================<u></u>==============================<u></u>=======<br>
--- lib/Support/Dwarf.cpp<br>
+++ lib/Support/Dwarf.cpp<br>
@@ -456,10 +456,11 @@<br>
case DW_OP_bit_piece: return "DW_OP_bit_piece";<br>
case DW_OP_implicit_value: return "DW_OP_implicit_value";<br>
case DW_OP_stack_value: return "DW_OP_stack_value";<br>
- case DW_OP_lo_user: return "DW_OP_lo_user";<br>
- case DW_OP_hi_user: return "DW_OP_hi_user";<br>
<br>
- // DWARF5 Fission Proposal Op Extensions<br>
+ // GNU thread-local storage<br>
+ case DW_OP_GNU_push_tls_address: return<br>
"DW_OP_GNU_push_tls_address";<br>
+<br>
+ // DWARF5 Fission Proposal Op Extensions<br>
case DW_OP_GNU_addr_index: return "DW_OP_GNU_addr_index";<br>
case DW_OP_GNU_const_index: return<br>
"DW_OP_GNU_const_index";<br>
}<br>
<br>
______________________________<u></u>_________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu" target="_blank">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/<u></u>mailman/listinfo/llvm-commits</a><br>
<br>
<br>
<br>
</blockquote></blockquote>
______________________________<u></u>_________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu" target="_blank">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/<u></u>mailman/listinfo/llvm-commits</a><br>
<br>
</blockquote></blockquote>
______________________________<u></u>_________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu" target="_blank">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/<u></u>mailman/listinfo/llvm-commits</a><br>
</div></div></blockquote></div><br></div></div>