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

@ -32,6 +32,7 @@
* 31 - bit 31 is set * 31 - bit 31 is set
* 32 - no bits set * 32 - no bits set
****************************************************************************/ ****************************************************************************/
.syntax unified
.align 2 .align 2
.global find_first_set_bit .global find_first_set_bit
.type find_first_set_bit,%function .type find_first_set_bit,%function

View file

@ -189,6 +189,7 @@ void ICODE_ATTR lcd_bitmap_transparent_part(const fb_data *src, int src_x,
{ {
int w, px; int w, px;
asm volatile ( asm volatile (
BEGIN_ARM_ASM_SYNTAX_UNIFIED
".rowstart: \n" ".rowstart: \n"
"mov %[w], %[width] \n" /* Load width for inner loop */ "mov %[w], %[width] \n" /* Load width for inner loop */
".nextpixel: \n" ".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 */ "add %[d], %[d], #2 \n" /* Uncoditionally increment dst */
/* done here for better pipelining */ /* done here for better pipelining */
"cmp %[px], %[fgcolor] \n" /* Compare to foreground color */ "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 */ "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? */ "subs %[w], %[w], #1 \n" /* Width counter has run down? */
"bgt .nextpixel \n" /* More in this row? */ "bgt .nextpixel \n" /* More in this row? */
"add %[s], %[s], %[sstp], lsl #1 \n" /* Skip over to start of next line */ "add %[s], %[s], %[sstp], lsl #1 \n" /* Skip over to start of next line */
"add %[d], %[d], %[dstp], lsl #1 \n" "add %[d], %[d], %[dstp], lsl #1 \n"
"subs %[h], %[h], #1 \n" /* Height counter has run down? */ "subs %[h], %[h], #1 \n" /* Height counter has run down? */
"bgt .rowstart \n" /* More rows? */ "bgt .rowstart \n" /* More rows? */
END_ARM_ASM_SYNTAX_UNIFIED
: [w]"=&r"(w), [h]"+&r"(height), [px]"=&r"(px), : [w]"=&r"(w), [h]"+&r"(height), [px]"=&r"(px),
[s]"+&r"(src), [d]"+&r"(dst) [s]"+&r"(src), [d]"+&r"(dst)
: [width]"r"(width), : [width]"r"(width),

View file

@ -23,6 +23,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA
*/ */
#include "demac_config.h" #include "demac_config.h"
.syntax unified
.section ICODE_SECTION_DEMAC_ARM,"ax",%progbits .section ICODE_SECTION_DEMAC_ARM,"ax",%progbits
.align 2 .align 2

View file

@ -21,6 +21,7 @@
#include "config.h" #include "config.h"
.syntax unified
.section .text, "ax", %progbits .section .text, "ax", %progbits
/**************************************************************************** /****************************************************************************

View file

@ -21,6 +21,7 @@
#include "config.h" #include "config.h"
.syntax unified
.section .text, "ax", %progbits .section .text, "ax", %progbits

View file

@ -21,6 +21,8 @@
#include "config.h" #include "config.h"
.syntax unified
/* The following is an assembler optimised version of the LPC filtering /* The following is an assembler optimised version of the LPC filtering
routines needed for FLAC decoding. It is optimised for use with ARM routines needed for FLAC decoding. It is optimised for use with ARM
processors. processors.

View file

@ -202,6 +202,7 @@
@***************************************************************************** @*****************************************************************************
.syntax unified
.text .text
.align .align

View file

@ -22,6 +22,7 @@
#include "config.h" #include "config.h"
#include "mad_iram.h" #include "mad_iram.h"
.syntax unified
.section ICODE_SECTION_MPA_ARM,"ax",%progbits .section ICODE_SECTION_MPA_ARM,"ax",%progbits
.global synth_full_odd_sbsample .global synth_full_odd_sbsample

View file

@ -21,6 +21,7 @@
#include "config.h" #include "config.h"
.syntax unified
#if defined(CPU_S5L87XX) #if defined(CPU_S5L87XX)
/* Moving this asm routine to iram is (little) faster on S5L87xx. */ /* Moving this asm routine to iram is (little) faster on S5L87xx. */
.section .icode, "ax", %progbits .section .icode, "ax", %progbits

View file

@ -33,6 +33,7 @@
*/ */
#include "config.h" #include "config.h"
.syntax unified
#if CONFIG_CPU == PP5002 #if CONFIG_CPU == PP5002
.section .icode,"ax",%progbits .section .icode,"ax",%progbits
#else #else

View file

@ -38,6 +38,7 @@
#include "config.h" #include "config.h"
.syntax unified
.text .text
.align .align
.global decorr_stereo_pass_cont_arm .global decorr_stereo_pass_cont_arm

View file

@ -40,6 +40,7 @@
#include "config.h" #include "config.h"
.syntax unified
.text .text
.align .align
.global decorr_stereo_pass_cont_arml .global decorr_stereo_pass_cont_arml