How to Use arm Instruction Set in Apple llvm3.0

Source: Internet
Author: User

In the llvm gcc4.2 compiler, Apple uses the prompt interface in xcode to explicitly provide programmers with options for compiling the target code into arm. In Apple llvm3.0, this option is missing.

Because the apple A4/A5 processor using the armv7a architecture has the thumb-2 instruction set, the thumb Code further improves the computing capability while ensuring the closeness. Therefore, Apple sets the project configuration to compile as thumb code by default.

Since llvm compilation options are basically compatible with GCC, we only need to manually add-marm to the compilation options.

However, the traditional GCC compilation option is-mthumb. By default, it compiles the code into an arm instruction set. Therefore, the-marm compilation option may not be provided. But-marm does work in Apple llvm3.0. Hehaoha

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.