Skip to content

Commit

Permalink
Handle alignment when it is bigger than BIGGEST_ALIGMENT (#29)
Browse files Browse the repository at this point in the history
The patch handles alignment when it is bigger than BIGGEST_ALIGMENT.
  • Loading branch information
eukarpov committed Nov 13, 2024
1 parent 78c9e79 commit 3176194
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions gcc/config/aarch64/aarch64-coff.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,16 @@
assemble_name ((FILE), (NAME)), \
fprintf ((FILE), ",%u\n", (int)(ROUNDED)))

#define ASM_OUTPUT_ALIGNED_LOCAL(FILE, NAME, SIZE, ALIGNMENT) \
{ \
unsigned HOST_WIDE_INT rounded = MAX((SIZE), 1); \
unsigned HOST_WIDE_INT alignment = MAX((ALIGNMENT), BIGGEST_ALIGNMENT); \
rounded += (alignment / BITS_PER_UNIT) - 1; \
rounded = (rounded / (alignment / BITS_PER_UNIT) \
* (alignment / BITS_PER_UNIT)); \
ASM_OUTPUT_LOCAL(FILE, NAME, SIZE, rounded); \
}

#define ASM_OUTPUT_SKIP(STREAM, NBYTES) \
fprintf (STREAM, "\t.space\t%d // skip\n", (int) (NBYTES))

Expand Down

0 comments on commit 3176194

Please sign in to comment.