Am 12.02.21 um 17:56 schrieb Ralph Doncaster: > I'm using sdcc with a mcs51 target for which some instructions take > longer when they are not word aligned. For timing-sensitive code, I can > write it in asm and use the .even or .bndry directives. I couldn't find > anything in the SDCC manual to restrict the alignment of a function or > block of code. Is there any way of doing it?
As far as I know, the only way to specify alignment in SDCC in C11 alignas, which AFAIK according to the C standard is meant only for object declarations, not functions. And even for alignas, SDCC does AFAIK currently not support alignment other than 0 or 1. Also I don't know how well .even and .bndry work in the assembler. AFAIR, assembler problems with those were the reason for the lack of support of alignas other than 0 and 1 in SDCC. Philipp _______________________________________________ Sdcc-user mailing list Sdcc-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sdcc-user