This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

force gcc usign ARM instruction set,why there are 2byte aligned instructions?

  • Note: This was originally posted on 6th September 2012 at http://forums.arm.com

    Hmm - that's Thumb code.

    (1) Are you sure it recompiled?

    (2) Try -mno-thumb

    Pete
  • Note: This was originally posted on 6th September 2012 at http://forums.arm.com

    This code looks like it's either precompiled library or compiler support code; -marm only affects the code you actually compile, not the things it is linked with.

    hth
    s.
  • Note: This was originally posted on 7th September 2012 at http://forums.arm.com

    Thanks for your reply.
    The function above calls the code in section .init to do some init work. How can I compile the source code totally into ARM instruction set,without any other instruction set?
    As you say,I have another question,if I had a ARM core which support ONLY ARM instruction set(there is no Thumb,thumb-2 and so on),but with MMU(which means can run LinuxOS),Can I compile the Linux kernel to run on that ARM core?

    This code looks like it's either precompiled library or compiler support code; -marm only affects the code you actually compile, not the things it is linked with.

    hth
    s.
  • Note: This was originally posted on 7th September 2012 at http://forums.arm.com

    Thanks for your reply.

    The source code was recompiled, with the -O2 -marm.I had tried the -mno-thumb,and recompiled again,but the ouput was the same.

    The function above calls the code in section .init to do some init work. How can I compile the source code totally into ARM instruction set,without any other instruction set?
    I have another question,if I had a ARM core which support ONLY ARM instruction set(there is no Thumb,thumb-2 and so on),but with MMU(which means can run LinuxOS),Can I compile the Linux kernel to run on that ARM core?

    thanks again.


    Hmm - that's Thumb code.

    (1) Are you sure it recompiled?

    (2) Try -mno-thumb

    Pete
  • Note: This was originally posted on 7th September 2012 at http://forums.arm.com


    How can I compile the source code totally into ARM instruction set....if I had a ARM core which support ONLY ARM instruction set


    I don't believe ARM license such a core; all ARM cores for the past 15+ years have supported mixed ARM and Thumb code, so you may find this challenging.
    Given that you've got a Tegra2, why do you need this?

    hth
    s.