You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.
Notice how the first instruction in main is at address 4. This is wrong, as the default subfunction alignment is 16 (since we have not specified the alignment using -mpatmos-subfunction-align).
Trying other alignments, and trying to make additional subfunctions by using -mpatmos-max-subfunction-size, gives the same results: the alignment is ignored and always set to a 4 byte boundary.
This issue does not appear if we output assembly (patmos-llc main.s -mpatmos-subfunction-align=8). the alignment assigned to the function will be correct:
After some investigation I found out that the flag does have an effect: It aligns a subfunction including the .size declaration.
This means the word preceding the first instruction (which declared the subfunction's size) is included in the subfunction and as such is what gets aligned. The first instruction is therefore always 4 bytes offset from the given alignment.
After talking with @schoeberl it was decided this functionality will be preserved as-is.
Take the following LLVM program (
main.s
):Compiling it (
patmos-llc main.s -filetype=obj -o main.o
) and then inspecting the code (patmos-llvm-objdump main.o -d
) will give the following:Notice how the first instruction in
main
is at address 4. This is wrong, as the default subfunction alignment is 16 (since we have not specified the alignment using-mpatmos-subfunction-align
).Trying other alignments, and trying to make additional subfunctions by using
-mpatmos-max-subfunction-size
, gives the same results: the alignment is ignored and always set to a 4 byte boundary.This issue does not appear if we output assembly (
patmos-llc main.s -mpatmos-subfunction-align=8
). the alignment assigned to the function will be correct:The text was updated successfully, but these errors were encountered: