public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Hendric" <hendric.lee@gmail.com>
To: <gcc-help@gcc.gnu.org>
Subject: Strange code generation by x86_64-pc-linux-gnu
Date: Wed, 26 Apr 2006 04:53:00 -0000	[thread overview]
Message-ID: <001901c668ed$25cda5d0$8723a8c0@9c5c9a7738c042f> (raw)

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. 

                 reply	other threads:[~2006-04-26  4:53 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='001901c668ed$25cda5d0$8723a8c0@9c5c9a7738c042f' \
    --to=hendric.lee@gmail.com \
    --cc=gcc-help@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).