-
Notifications
You must be signed in to change notification settings - Fork 74
Open
Description
Not really an issue, but notes (from @Emoun) what needs to be done in the Patmos C source files and in the handbook:
Changes:
- Can no longer use clang as a linker using the below flags:
"-fpatmos-nolibsyms", "-fpatmos-noruntimelibs", "-fpatmos_link_object"
Instead, use "-c" to create object files and then call the linker directly. - Removed flag "-fpatmos-skip-opt". Using "-O0" instead.
- Removed flag "-fpatmos-emit-asm". Using "-S" instead.
- Multiple "patmos-clang" patmos-specific flags have been removed.
Instead, call the equivalent "patmos-ld" flags using "-mllvm" prefix:
"-mpatmos-disable-stack-cache" -> "-mllvm --mpatmos-disable-stack-cache"
"-mpatmos-disable-function-splitter" -> "-mllvm --mpatmos-disable-function-splitter"
"-mpatmos-disable-vliw" -> "-mllvm --mpatmos-disable-vliw"
Note how the flags need 2 "-" instead of the previous 1. - Removed flag "-Xgold". Using "-Wl," instead.
- Removed flag "-Xllc". Using "-mllvm" instead.
- In inline assembly, input-, ouput-, and clobber registers should no longer have a "$" prefix.
I.e. instead of "$r1" use "r1" as clobber register.
In the inline assembly proper, registers need/allow 1 "$" only. - Naked functions can only include inline assembly.
No other code is allowed per the C standard.
If you want to use C code in a naked function, you can manually call a non-naked function from
the inline assembly.
Notes:
Handbook says by default clang compiles to bitcode (section 8.2.1). This is wrong.
Metadata
Metadata
Assignees
Labels
No labels