Raydium 3D Game Engine

Official forum for everything about Raydium, ManiaDrive, MeMak, ...
It is currently Thu Mar 28, 2024 2:53 pm

All times are UTC




Post new topic Reply to topic  [ 40 posts ]  Go to page Previous  1, 2, 3
Author Message
PostPosted: Wed Aug 19, 2009 11:12 am 
Offline

Joined: Wed May 06, 2009 2:06 pm
Posts: 30
intel 64bit

gcc a.c -O3
Code:
 00000000004004b0 <test>:
  4004b0:       8d 47 01                lea    0x1(%rdi),%eax
  4004b3:       89 05 6f 0b 20 00       mov    %eax,0x200b6f(%rip)        # 601028 <global>
  4004b9:       c3                      retq                                               
  4004ba:       66 0f 1f 44 00 00       nopw   0x0(%rax,%rax,1)       


gcc a.c -O3 -fPIC
Code:
0000000000400500 <test>:
  400500:       48 8b 15 d9 0a 20 00    mov    0x200ad9(%rip),%rdx        # 600fe0 <_DYNAMIC+0x1a8>
  400507:       8d 47 01                lea    0x1(%rdi),%eax                                     
  40050a:       89 02                   mov    %eax,(%rdx)                                         
  40050c:       c3                      retq                                                       
  40050d:       0f 1f 00                nopl   (%rax)


btw, without optimization : gcc a.out
Code:
00000000004004ac <test>:
  4004ac:       55                      push   %rbp
  4004ad:       48 89 e5                mov    %rsp,%rbp
  4004b0:       89 7d fc                mov    %edi,-0x4(%rbp)
  4004b3:       8b 45 fc                mov    -0x4(%rbp),%eax
  4004b6:       89 05 6c 0b 20 00       mov    %eax,0x200b6c(%rip)        # 601028 <global>
  4004bc:       8b 05 66 0b 20 00       mov    0x200b66(%rip),%eax        # 601028 <global>
  4004c2:       83 c0 01                add    $0x1,%eax                                   
  4004c5:       89 05 5d 0b 20 00       mov    %eax,0x200b5d(%rip)        # 601028 <global>
  4004cb:       8b 05 57 0b 20 00       mov    0x200b57(%rip),%eax        # 601028 <global>
  4004d1:       c9                      leaveq                                             
  4004d2:       c3                      retq       


Top
 Profile  
 
PostPosted: Wed Aug 19, 2009 3:30 pm 
Offline
User avatar

Joined: Sun Mar 16, 2003 2:53 am
Posts: 2591
Location: gnniiiii (Scrat)
OK, thanks. So, my bad, it's now clear that AMD64 and Intel64 features native offset mapping. In other words, fPIC should be used in all 64 bits targets.

Vicente, aapo, what "uname -m" returns in your systems ? (i686 here with i32)


Top
 Profile  
 
PostPosted: Wed Aug 19, 2009 4:52 pm 
Offline

Joined: Wed May 06, 2009 2:06 pm
Posts: 30
uname -m
x86_64


Top
 Profile  
 
PostPosted: Wed Aug 19, 2009 7:23 pm 
Offline
User avatar

Joined: Thu Sep 29, 2005 2:59 pm
Posts: 828
$ uname -m
x86_64

Ok, looks like I have to do another patch ;)


Top
 Profile  
 
PostPosted: Wed Aug 19, 2009 8:18 pm 
Offline
User avatar

Joined: Thu Sep 29, 2005 2:59 pm
Posts: 828
The third, and I hope the last, patch.
This time it works when uname -m answers "x86_64".

http://www.sendspace.com/file/rkq9x5

aapo, can you try this one from a new installation of raydium?


Top
 Profile  
 
PostPosted: Wed Aug 19, 2009 8:38 pm 
Offline

Joined: Wed May 06, 2009 2:06 pm
Posts: 30
Now patch works great.


Top
 Profile  
 
PostPosted: Wed Aug 19, 2009 9:07 pm 
Offline
User avatar

Joined: Thu Sep 29, 2005 2:59 pm
Posts: 828
Then, should I do a commit already?


Top
 Profile  
 
PostPosted: Wed Aug 19, 2009 9:19 pm 
Offline
User avatar

Joined: Sun Mar 16, 2003 2:53 am
Posts: 2591
Location: gnniiiii (Scrat)
No problem with 32 bits here, it's OK for me.


Top
 Profile  
 
PostPosted: Wed Aug 19, 2009 9:27 pm 
Offline
User avatar

Joined: Thu Sep 29, 2005 2:59 pm
Posts: 828
Ready.
One problem less :)


Top
 Profile  
 
PostPosted: Wed Aug 19, 2009 9:33 pm 
Offline
User avatar

Joined: Sun Mar 16, 2003 2:53 am
Posts: 2591
Location: gnniiiii (Scrat)
Thanks to both of you guys !


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 40 posts ]  Go to page Previous  1, 2, 3

All times are UTC


Who is online

Users browsing this forum: No registered users and 33 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group