1
0
Fork 0
forked from len0rd/rockbox

arm: enable unified assembly syntax in more files

This makes these files compileable, or in some cases less
broken, on Cortex-M targets.

In lcd-16bit.c, newer versions of GAS complain about the
infix condition codes so we use the suffix form instead,
which requires unified syntax to compile on GCC 4.9.

Change-Id: If45166d3fc83d64c692cbb331096a966397aa9e9
This commit is contained in:
Aidan MacDonald 2025-01-16 14:03:46 +00:00 committed by Solomon Peachy
parent 639b587fc7
commit a0bfcd77c8
12 changed files with 16 additions and 2 deletions

View file

@ -189,6 +189,7 @@ void ICODE_ATTR lcd_bitmap_transparent_part(const fb_data *src, int src_x,
{
int w, px;
asm volatile (
BEGIN_ARM_ASM_SYNTAX_UNIFIED
".rowstart: \n"
"mov %[w], %[width] \n" /* Load width for inner loop */
".nextpixel: \n"
@ -196,15 +197,16 @@ void ICODE_ATTR lcd_bitmap_transparent_part(const fb_data *src, int src_x,
"add %[d], %[d], #2 \n" /* Uncoditionally increment dst */
/* done here for better pipelining */
"cmp %[px], %[fgcolor] \n" /* Compare to foreground color */
"streqh %[fgpat], [%[d], #-2] \n" /* Store foregroud if match */
"strheq %[fgpat], [%[d], #-2] \n" /* Store foregroud if match */
"cmpne %[px], %[transcolor] \n" /* Compare to transparent color */
"strneh %[px], [%[d], #-2] \n" /* Store dst if not transparent */
"strhne %[px], [%[d], #-2] \n" /* Store dst if not transparent */
"subs %[w], %[w], #1 \n" /* Width counter has run down? */
"bgt .nextpixel \n" /* More in this row? */
"add %[s], %[s], %[sstp], lsl #1 \n" /* Skip over to start of next line */
"add %[d], %[d], %[dstp], lsl #1 \n"
"subs %[h], %[h], #1 \n" /* Height counter has run down? */
"bgt .rowstart \n" /* More rows? */
END_ARM_ASM_SYNTAX_UNIFIED
: [w]"=&r"(w), [h]"+&r"(height), [px]"=&r"(px),
[s]"+&r"(src), [d]"+&r"(dst)
: [width]"r"(width),