<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">I filed PR 17321 for this.<br>
The problem code is in llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
around line 2844. Apparently Span.End is set for the .comm symbol
in this case.<br>
<br>
-Rich<br>
<br>
On 09/21/2013 10:26 PM, Richard Mitton wrote:<br>
</div>
<blockquote cite="mid:523E6361.8040704@codersnotes.com" type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
If it thinks the symbol is in the BSS section, then it should
never have tried to use .comm to emit it I think. <br>
<br>
On x86 it does not try to mix and match, which is why it works.
AFAIK comm symbols are regarded as having no section, rather than
being bss, so I think it's a bug in whatever code printed that
.comm statement.<br>
<br>
I'll look into this tomorrow.<br>
<br>
<blockquote style="border: 0px none;"
cite="mid:CALehDX4RtKp99kN4odh08Rzyaw+QuToTNyaLqo5vHWSH5jLs1A@mail.gmail.com"
type="cite">
<div style="margin:30px 25px 10px 25px;" class="__pbConvHr">
<div style="display:table;width:100%;border-top:1px solid
#EDEEF0;padding-top:5px">
<div
style="display:table-cell;vertical-align:middle;padding-right:6px;"><img
photoaddress="echristo@gmail.com" photoname="Eric
Christopher"
src="cid:part1.06010306.05050604@pennware.com"
name="compose-unknown-contact.jpg" height="25px"
width="25px"></div>
<div
style="display:table-cell;white-space:nowrap;vertical-align:middle;width:100%">
<a moz-do-not-send="true" href="mailto:echristo@gmail.com"
style="color:#737F92
!important;padding-right:6px;font-weight:bold;text-decoration:none
!important;">Eric Christopher</a></div>
<div
style="display:table-cell;white-space:nowrap;vertical-align:middle;">
<font color="#9FA2A5"><span style="padding-left:6px">Saturday,
September 21, 2013 11:26 AM</span></font></div>
</div>
</div>
<div style="color:#888888;margin-left:24px;margin-right:24px;"
__pbrmquotes="true" class="__pbConvBody">
<p dir="ltr">Interesting. File please? Thanks. </p>
<div>_______________________________________________<br>
LLVM Developers mailing list<br>
<a moz-do-not-send="true" class="moz-txt-link-abbreviated"
href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext"
href="http://llvm.cs.uiuc.edu">http://llvm.cs.uiuc.edu</a><br>
<a moz-do-not-send="true" class="moz-txt-link-freetext"
href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
</div>
</div>
<div style="margin:30px 25px 10px 25px;" class="__pbConvHr">
<div style="display:table;width:100%;border-top:1px solid
#EDEEF0;padding-top:5px">
<div
style="display:table-cell;vertical-align:middle;padding-right:6px;"><img
photoaddress="rich@pennware.com" photoname="Richard
Pennington"
src="cid:part1.06010306.05050604@pennware.com"
name="compose-unknown-contact.jpg" height="25px"
width="25px"></div>
<div
style="display:table-cell;white-space:nowrap;vertical-align:middle;width:100%">
<a moz-do-not-send="true" href="mailto:rich@pennware.com"
style="color:#737F92
!important;padding-right:6px;font-weight:bold;text-decoration:none
!important;">Richard Pennington</a></div>
<div
style="display:table-cell;white-space:nowrap;vertical-align:middle;">
<font color="#9FA2A5"><span style="padding-left:6px">Saturday,
September 21, 2013 5:52 AM</span></font></div>
</div>
</div>
<div style="color:#888888;margin-left:24px;margin-right:24px;"
__pbrmquotes="true" class="__pbConvBody">Hi,
<br>
<br>
I just updated from r190763 to r191137 and started getting
failures in generated assembly language when debug info is
enabled. Here is the test case:
<br>
<br>
// Compile and run for every target.
<br>
// RUN: %ecc -g -o %t %s && %t
<br>
// FAIL: %armecc -g -o %t %s && %armrun %t
<br>
// FAIL: %armebecc -g -o %t %s && %armebrun %t
<br>
// RUN: %i386ecc -g -o %t %s && %i386run %t
<br>
// FAIL: %microblazeecc -g -o %t %s && %microblazerun
%t
<br>
// FAIL: %mipsecc -g -o %t %s && %mipsrun %t
<br>
// FAIL: %mipselecc -g -o %t %s && %mipselrun %t
<br>
// FAIL: %ppcecc -g -o %t %s && %ppcrun %t
<br>
// FAIL: %ppc64ecc -g -o %t %s && %ppc64run %t
<br>
// RUN: %x86_64ecc -g -o %t %s && %x86_64run %t
<br>
<br>
int comm;
<br>
int main()
<br>
{
<br>
comm = 6;
<br>
}
<br>
<br>
This fails on all but the x86 processors. The typical failure
looks like this:
<br>
...
<br>
.type comm,@object # @comm
<br>
.comm comm,4,4
<br>
.cfi_sections .debug_frame
<br>
.bss
<br>
.L.bss_end:
<br>
...
<br>
.L.debug_abbrev_end:
<br>
.section .debug_aranges,"",@progbits
<br>
.long 36 # Length of ARange Set
<br>
.short 2 # DWARF Arange version
number
<br>
.long .L.debug_info_begin0 # Offset Into Debug
Info Section
<br>
.byte 4 # Address Size (in
bytes)
<br>
.byte 0 # Segment Size (in
bytes)
<br>
.byte 255
<br>
.byte 255
<br>
.byte 255
<br>
.byte 255
<br>
.long comm
<br>
.Lset0 = .L.bss_end-comm
<br>
.long .Lset0
<br>
<br>
The typical error message is:
<br>
/tmp/debug-8ecf9d.s: Assembler messages:
<br>
/tmp/debug-8ecf9d.s: Error: invalid operands (.bss and *COM*
sections) for `-' when setting `.Lset0'
<br>
<br>
Is it legal to mix .comm symbols and .bss symbols in assembly?
Is the x86 success a bug or a feature?
<br>
<br>
-Rich
<br>
_______________________________________________
<br>
LLVM Developers mailing list
<br>
<a moz-do-not-send="true" class="moz-txt-link-abbreviated"
href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext"
href="http://llvm.cs.uiuc.edu">http://llvm.cs.uiuc.edu</a>
<br>
<a moz-do-not-send="true" class="moz-txt-link-freetext"
href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a>
<br>
</div>
</blockquote>
</blockquote>
<br>
</body>
</html>