Access the answers to your technology questions today.
Subscribe Now
30-day free trial. Register in 60 seconds.
What Makes Experts Exchange Unique?
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.
Try it out and discover for yourself.
Subscribe Now
30-day free trial. Register in 60 seconds.
Join the Community
Give a Little. Get a Lot.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Join the Community
by: Infinity08Posted on 2009-06-02 at 23:32:25ID: 24533756
>> and i can't find reference of "usat" command
That's part of the ARM instruction set (iPhone's CPU is an ARM CPU afaik). If you type in "ARM instruction set quick reference" in Google, you should get some good results ...
>> __asm__("add %1, %0" : "=r"(y) : "r"(a), "r" (b));
That looks like x86 assembly. The ARM add instruction takes 3 parameters.
>> oh, it will work on device however not work on simulator
The iPhone simulator runs x86 code afaik, not ARM code (it doesn't emulate the iPhone hardware, just simulates it). This is why it didn't work on your simulator, but worked on the phone itself.
You could always use an #if to check whether you're compiling for the simulator or for the phone, and generate different code for each.