__fastcall calling convention on iPhone

Apprentice
Posts: 8
Joined: 2009.11
Post: #1
Does anybody knows how to make __fastcall calling convention as a default?
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #2
__fastcall is an i386 (and largely Windows) thing which makes better use of the small number of registers on i386. The phone is ARM, and has plenty of registers, and therefore no such problem.
Quote this message in a reply
Apprentice
Posts: 8
Joined: 2009.11
Post: #3
(Aug 21, 2010 11:42 AM)OneSadCookie Wrote:  __fastcall is an i386 (and largely Windows) thing which makes better use of the small number of registers on i386. The phone is ARM, and has plenty of registers, and therefore no such problem.

I'm not so good familiar with ARM/x86 architectures, but as far as i know, x86 processors has more general purpose registers, but that's not the point! You are wrong with purpose of __fastcall, it's used to call functions quicker because firs 2 integer parameters are send throught registers, all other - throught stack (in __cdecl\__stdcall all parameters are send through stack). So i hoped i can get this little profit on iPhone. Anyway, thx for answer!
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #4
ARM has 16 general purpose integer registers, i386 has 4. On ARM, the first 4 integer parameters are always passed in registers:

http://developer.apple.com/iphone/librar...tions.html
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  installing app via xcode to iphone 4s, cause iphone to freeze while calling or receiv sefiroths 3 4,045 Feb 11, 2012 12:10 PM
Last Post: sefiroths
  removeFromSuperview not calling dealloc of view - SOLVED BeyondCloister 5 13,578 Aug 11, 2010 01:18 PM
Last Post: BeyondCloister
  Calling Obj-C from C miq01 7 4,671 May 1, 2009 09:19 PM
Last Post: ThemsAllTook
  release memory calling HTMLs files imaumac 3 2,917 Dec 23, 2008 07:49 AM
Last Post: imaumac