Andes Workshop

It is currently Fri Mar 29, 2024 2:01 am

All times are UTC + 8 hours [ DST ]




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: __FP_BASE__的說明
PostPosted: Wed May 16, 2012 11:49 am 
Offline
User avatar

Joined: Fri Mar 04, 2011 9:36 pm
Posts: 500
主要是由 post-opt 加入的, linker則是負責填上值
__FP_BASE__是用來做 fp-as-gp optimization

例如
lwi.gp $r0, [+0]
lwi.gp $r1, [+4]
lwi.gp $r2, [+8]
lwi.gp $r3, [+12]
這樣需要 4*4 = 16 bytes

但改成
addi.gp $fp, __FP_BASE__ ; la $fp, __FP_BASE__
lwi37.fp $r0, [+0]
lwi37.fp $r1, [+4]
lwi37.fp $r2, [+8]
lwi37.fp $r3, [+12]
則只要 4 + 2*4 = 12 bytes

一般來說, la $fp, __FP_BASE__這道會在要做這個 optimization的function prologue


Top
 Profile Send private message E-mail  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC + 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 15 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 © 2000, 2002, 2005, 2007 phpBB Group