Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate the ARM entry point to global_asm!. #383

Merged
merged 2 commits into from
Feb 16, 2022

Commits on Feb 15, 2022

  1. Migrate the ARM entry point to global_asm!.

    Building `libtock_runtime` no longer requires an external toolchain.
    
    Help Needed
    -----------
    
    This generates significantly different code for the entry point than the old
    implementation. I don't have an ARM board to test with, or enough knowledge to
    understand why the difference exists, so I need help testing/debugging this.
    jrvanwhy committed Feb 15, 2022
    Configuration menu
    Copy the full SHA
    9370dd3 View commit details
    Browse the repository at this point in the history
  2. Tweak the ARM assembly to generate smaller instructions.

    LLVM doesn't automatically pick the smallest instructions for the add/mov/sub mnemonics like GCC did. This means that moving to global_asm! made `start` larger. This change explicitly names the smaller instructions, and generates code of identical size to the GCC toolchain.
    
    There is one remaining difference between the external assembly and this `global_asm!` implementation: LLVM translates `mov r5, r0` into `mov r5, r0`, whereas GCC translated it into `adds r5, r0, #0`.
    jrvanwhy committed Feb 15, 2022
    Configuration menu
    Copy the full SHA
    8321d1a View commit details
    Browse the repository at this point in the history