Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Arm Trusted Firmware
Commits
b39dca40
Commit
b39dca40
authored
Sep 16, 2020
by
Madhukar Pappireddy
Committed by
TrustedFirmware Code Review
Sep 16, 2020
Browse files
Merge "doc: Recommend using C rather than assembly language" into integration
parents
8f5426cc
06ffa166
Changes
1
Hide whitespace changes
Inline
Side-by-side
docs/process/coding-guidelines.rst
View file @
b39dca40
...
@@ -442,6 +442,25 @@ unsigned integer on all systems, cast it to ``unsigned int``.
...
@@ -442,6 +442,25 @@ unsigned integer on all systems, cast it to ``unsigned int``.
These guidelines should be updated if additional types are needed.
These guidelines should be updated if additional types are needed.
Favor C language over assembly language
---------------------------------------
Generally, prefer code written in C over assembly. Assembly code is less
portable, harder to understand, maintain and audit security wise. Also, static
analysis tools generally don't analyze assembly code.
There are, however, legitimate uses of assembly language. These include:
- Early boot code executed before the C runtime environment is setup.
- Exception handling code.
- Low-level code where the exact sequence of instructions executed on the CPU
matters, such as CPU reset sequences.
- Low-level code where specific system-level instructions must be used, such
as cache maintenance operations.
--------------
--------------
*Copyright (c) 2020, Arm Limited and Contributors. All rights reserved.*
*Copyright (c) 2020, Arm Limited and Contributors. All rights reserved.*
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment