public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Strange code generation by x86_64-pc-linux-gnu
@ 2006-04-26  4:53 Hendric
  0 siblings, 0 replies; only message in thread
From: Hendric @ 2006-04-26  4:53 UTC (permalink / raw)
  To: gcc-help

Hi all,I'm now busy implementing early_kprintf aimed to print strings into screen.For test I write a simple function as follow:

int early_kprintf(char* fmt,char* fmt2,...)
{
   return 0;
}

After compiling by x86_64-pc-linux-gnu-gcc(with version 3.4.0), I tried to link all .o files.But "relocationg truncated to fit: .text 0x6fe+.text" error again happened.I ran objdump to dump the very .o file,I found it strange:

00000000000006b0 <early_kprintf>:
6b0:   55                     push  %rbp
6b1:   48 89 e5               mov    %rsp,%rbp
6b4:   48 81 ec d0 00 00 00    sub    $0xd0,%rsp
6bb:   48 89 bd 48 ff ff ff    mov    %rdi,0xffffffffffffff48(%rbp)
6c2:   48 89 95 60 ff ff ff    mov    %rdx,0xffffffffffffff60(%rbp)
6c9:   48 89 8d 68 ff ff ff    mov    %rcx,0xffffffffffffff68(%rbp)
6d0:   4c 89 85 70 ff ff ff    mov    %r8,0xffffffffffffff70(%rbp)
6d7:   4c 89 8d 78 ff ff ff    mov    %r9,0xffffffffffffff78(%rbp)
6de:   0f b6 c0               movzbl %al,%eax
6e1:   48 89 85 38 ff ff ff    mov    %rax,0xffffffffffffff38(%rbp)
6e8:   48 8b 95 38 ff ff ff    mov    0xffffffffffffff38(%rbp),%rdx
6ef:   48 8d 04 95 00 00 00    lea    0x0(,%rdx,4),%rax
6f6:   00 
6f7:   48 c7 85 38 ff ff ff    movq  $0x0,0xffffffffffffff38(%rbp)
6fe:   00 00 00 00 
702:   48 29 85 38 ff ff ff    sub    %rax,0xffffffffffffff38(%rbp)
709:   48 8d 45 ff             lea    0xffffffffffffffff(%rbp),%rax
70d:   48 8b 95 38 ff ff ff    mov    0xffffffffffffff38(%rbp),%rdx
714:   ff e2                   jmpq  *%edx
716:   0f 29 78 f1             movaps %xmm7,0xfffffffffffffff1(%rax)
71a:   0f 29 70 e1             movaps %xmm6,0xffffffffffffffe1(%rax)
71e:   0f 29 68 d1             movaps %xmm5,0xffffffffffffffd1(%rax)
722:   0f 29 60 c1             movaps %xmm4,0xffffffffffffffc1(%rax)
726:   0f 29 58 b1             movaps %xmm3,0xffffffffffffffb1(%rax)
72a:   0f 29 50 a1             movaps %xmm2,0xffffffffffffffa1(%rax)
72e:   0f 29 48 91             movaps %xmm1,0xffffffffffffff91(%rax)
732:   0f 29 40 81             movaps %xmm0,0xffffffffffffff81(%rax)
736:   48 89 b5 40 ff ff ff    mov    %rsi,0xffffffffffffff40(%rbp)
73d:   b8 00 00 00 00         mov    $0x0,%eax
742:   c9                     leaveq 
743:   c3                     retq  

I think it strange that why GCC refers to xmm registers.And I found no resolutions from GCC doc-book.Any help is appreciated. 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-04-26  4:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-04-26  4:53 Strange code generation by x86_64-pc-linux-gnu Hendric

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).