Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Mockup & CodeGen, iPhone & iPad
($9.99)

Make your own iPhone apps
and run them live!
(free)

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 02-08-2009, 02:14 PM   #13 (permalink)
zhyla
Registered Member
 
Join Date: Nov 2008
Posts: 253
Default

Quote:
Originally Posted by jcollins View Post
Actually, it's pretty easy. Just right click on a file you want to compile with ARM. Select "Get Info" and make sure the "Build" tab is selected. Should be an large text field. In this text field add "-mno-thumb" and that file will be compiled for ARM.

That works for me on my iPhone app. Alternatively you can use the "#pragma arm" and "#pragma thumb" directives to wrap your ARM code.
Good to know. The armcc compiler I use at work supports the same pragmas but I couldn't find any gcc documentation about that.

tawpie, here's the deal with ARM vs Thumb code. ARM code is a larger instruction set and has a lot shiny options that can give you faster performance. But Thumb code is 16 bits/instruction (half the size of ARM code) so you end up with a smaller code image. Smaller code means more of your code is cached and less time in general fetching instructions. So it definitely depends on your application which is optimal.

Probably, it's better to leave everything in Thumb mode and put only the most critical pieces in ARM mode (inner loops, heavy calculations, etc).
zhyla is offline   Reply With Quote
 

» Advertisements
» Online Users: 266
19 members and 247 guests
ADY, apatsufas, BdR, ckgni, F_Bryant, glenn_sayers, Guthook, ilmman, joeallenpro, ketaskin, michelle, Music Man, NSeven, smethorst, Sunny46, themathminister, TheWebWizz, zbynda, ziocleto
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,876
Threads: 89,225
Posts: 380,709
Top Poster: BrianSlick (7,129)
Welcome to our newest member, jorge599
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 08:11 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.