<div dir="ltr">Hi Vincent,<div><br></div><div style>A jump to the next instruction is often a sideeffect of looking at a non-relocated object with relocations to apply. Have you run this through objdump with the -r flag (objdump -dr $FILE) and seen if there is a relocation to apply to the jump?</div>
<div style><br></div><div style>I'm concerned about the lack of the code after MCCLEAN:, but it could be that the debugger is just not showing it to you for some reason - I'd check with objdump first as that never lies :)</div>
<div style><br></div><div style>Cheers,</div><div style><br></div><div style>James</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 11 March 2013 12:49, Vincent Habchi <span dir="ltr"><<a href="mailto:vince@macports.org" target="_blank">vince@macports.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi folks, gurus and experts –<br>
<br>
I am not sure this is the proper list to post to, but I try nevertheless. I am getting a strange .o output from an assembly file parsed by clang.<br>
<br>
From:<br>
.text<br>
.text<br>
.globl _ATL_UGEMV<br>
.align 6<br>
_ATL_UGEMV:<br>
<br>
[…]<br>
addpd %xmm0, %xmm1<br>
movaps %xmm1, 112-128(%r9)<br>
<br>
sub $-128, %r9<br>
sub $-128, %rdx<br>
sub $8*2, %rbx<br>
jnz LOOPM<br>
<br>
cmp $0, %rcx<br>
jz MCLEAN<br>
<br>
mov %rcx, %rbx<br>
LOOPMCU:<br>
movsd -128(%r9), %xmm1<br>
movsd -128(%rdx), %xmm0<br>
[…]<br>
<br>
dec %rbx<br>
jnz LOOPMCU<br>
<br>
MCLEAN:<br>
prefetchnta 12*8+64(%r8)<br>
add $12*8, %r8<br>
add %r15, %rdx<br>
mov %r11, %r9<br>
mov %rdi, %rbx<br>
sub $12, %rsi<br>
jnz LOOPN<br>
<br>
<br>
<br>
movq -8(%rsp), %rbp<br>
movq -16(%rsp), %rbx<br>
movq -24(%rsp), %r12<br>
movq -32(%rsp), %r13<br>
movq -40(%rsp), %r14<br>
movq -48(%rsp), %r15<br>
ret<br>
<br>
I get this after ‘clang -x assembler’ (clang version 3.3 (trunk 173279)):<br>
<br>
[…]<br>
dmvn_sse.o[0x6f8]: addpd %xmm0, %xmm1<br>
dmvn_sse.o[0x6fc]: movaps %xmm1, -16(%r9)<br>
dmvn_sse.o[0x701]: subq $-128, %r9<br>
dmvn_sse.o[0x705]: subq $-128, %rdx<br>
dmvn_sse.o[0x709]: subq $16, %rbx<br>
dmvn_sse.o[0x70d]: jne 0xc7 ; ATL_UGEMV + 199<br>
dmvn_sse.o[0x713]: cmpq $0, %rcx<br>
dmvn_sse.o[0x717]: je 0x71d ; ATL_UGEMV + 1821<br>
dmvn_sse.o[0x71d]: movq %rcx, %rbx<br>
dmvn_sse.o[0x720]: movsd -128(%r9), %xmm1<br>
dmvn_sse.o[0x726]: movsd -128(%rdx), %xmm0<br>
[…]<br>
dmvn_sse.o[0x7e7]: decq %rbx<br>
dmvn_sse.o[0x7ea]: jne 0x720 ; ATL_UGEMV + 1824<br>
<br>
The ‘jz MCLEAN’ has been replaced by a jump to the next instruction, the code after MCLEAN: is discarded and does not even appear in the .o file (if I believe lldb), so that the function abruptly ends up at the ‘jnz LOOPMCPU’. Needless to say, this code fails to run. Could anybody tell me what’s wrong?<br>
<br>
Thanks a lot!<br>
Vincent<br>
<br>
<br>
_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
</blockquote></div><br></div>