mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 10:07:38 -04:00
arm: Use -masm-syntax-unified when compiling with gcc8 or newer
Annoyingly, this makes all of the '.S' files we compile get treated as divided syntax, so we need to make the syntax in them explicit. Change-Id: I56a3916b7b24c84a1214a5d6bc4ed4d651f002cf
This commit is contained in:
parent
0a89d1d4df
commit
8c86fb6da0
17 changed files with 43 additions and 3 deletions
|
@ -21,6 +21,8 @@
|
|||
|
||||
#include "config.h"
|
||||
|
||||
.syntax unified
|
||||
|
||||
.global mpeg2_idct_copy
|
||||
.type mpeg2_idct_copy, %function
|
||||
.global mpeg2_idct_add
|
||||
|
|
|
@ -21,6 +21,8 @@
|
|||
|
||||
#include "config.h"
|
||||
|
||||
.syntax unified
|
||||
|
||||
.global mpeg2_idct_copy
|
||||
.type mpeg2_idct_copy, %function
|
||||
.global mpeg2_idct_add
|
||||
|
|
|
@ -24,6 +24,8 @@
|
|||
#include "config.h"
|
||||
#include "apps/core_asmdefs.h"
|
||||
|
||||
.syntax unified
|
||||
|
||||
.section .text
|
||||
.align 2
|
||||
.global jpeg_idct1h
|
||||
|
|
|
@ -24,6 +24,8 @@
|
|||
#include "config.h"
|
||||
#include "cpu.h"
|
||||
|
||||
.syntax unified
|
||||
|
||||
/****************************************************************************
|
||||
* void lcd_copy_buffer_rect(fb_data *dst, fb_data *src, int width,
|
||||
* int height);
|
||||
|
|
|
@ -35,6 +35,8 @@
|
|||
#define push lsr
|
||||
#endif
|
||||
|
||||
.syntax unified
|
||||
|
||||
/* Prototype: void *memcpy(void *dest, const void *src, size_t n); */
|
||||
/* Prototype: void *mempcpy(void *dest, const void *src, size_t n); */
|
||||
|
||||
|
|
|
@ -35,6 +35,8 @@
|
|||
#define push lsr
|
||||
#endif
|
||||
|
||||
.syntax unified
|
||||
|
||||
.text
|
||||
|
||||
/*
|
||||
|
|
|
@ -20,6 +20,8 @@
|
|||
****************************************************************************/
|
||||
#include "config.h"
|
||||
|
||||
.syntax unified
|
||||
|
||||
.section .icode,"ax",%progbits
|
||||
|
||||
.align 2
|
||||
|
|
|
@ -20,6 +20,8 @@
|
|||
****************************************************************************/
|
||||
#include "config.h"
|
||||
|
||||
.syntax unified
|
||||
|
||||
.section .icode,"ax",%progbits
|
||||
|
||||
.align 2
|
||||
|
|
|
@ -1018,14 +1018,19 @@ Lyre prototype 1 */
|
|||
* These macros are for switching on unified syntax in inline assembly.
|
||||
* Older versions of GCC emit assembly in divided syntax with no option
|
||||
* to enable unified syntax.
|
||||
*
|
||||
* FIXME: This needs to be looked at after the toolchain bump
|
||||
*/
|
||||
#if (__GNUC__ < 8)
|
||||
#define BEGIN_ARM_ASM_SYNTAX_UNIFIED ".syntax unified\n"
|
||||
#define END_ARM_ASM_SYNTAX_UNIFIED ".syntax divided\n"
|
||||
#else
|
||||
#define BEGIN_ARM_ASM_SYNTAX_UNIFIED
|
||||
#define END_ARM_ASM_SYNTAX_UNIFIED
|
||||
#endif
|
||||
|
||||
#if defined(CPU_ARM) && defined(__ASSEMBLER__)
|
||||
#if (__GNUC__ < 8)
|
||||
.syntax unified
|
||||
#endif
|
||||
/* ARMv4T doesn't switch the T bit when popping pc directly, we must use BX */
|
||||
.macro ldmpc cond="", order="ia", regs
|
||||
#if ARM_ARCH == 4 && defined(USE_THUMB)
|
||||
|
@ -1043,6 +1048,9 @@ Lyre prototype 1 */
|
|||
ldr\cond pc, [sp], #4
|
||||
#endif
|
||||
.endm
|
||||
#if (__GNUC__ < 8)
|
||||
.syntax divided
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(CPU_COLDFIRE) && defined(__ASSEMBLER__)
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
|
||||
#include "config.h"
|
||||
|
||||
.syntax unified
|
||||
|
||||
#if CONFIG_CPU == PP5002
|
||||
/* Causes ATA retries on iPod G3 probably related to improper controller
|
||||
|
|
|
@ -30,6 +30,8 @@
|
|||
|
||||
#include <config.h>
|
||||
|
||||
.syntax unified
|
||||
|
||||
.macro ARM_SDIV32_PRE numerator, divisor, sign
|
||||
/* sign[31] = divisor sign */
|
||||
ands \sign, \divisor, #1<<31
|
||||
|
|
|
@ -29,6 +29,9 @@
|
|||
****************************************************************************/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
.syntax unified
|
||||
|
||||
/* On targets with codec iram, a header file will be generated after an initial
|
||||
link of the APE codec, stating the amount of IRAM remaining for use by the
|
||||
reciprocal lookup table. */
|
||||
|
|
|
@ -26,6 +26,8 @@
|
|||
* void hybrid_filter(fltst *fs, int *in)
|
||||
*/
|
||||
|
||||
.syntax unified
|
||||
|
||||
#ifdef USE_IRAM
|
||||
.section .icode, "ax", %progbits
|
||||
#else
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
****************************************************************************/
|
||||
#include "rbcodecconfig.h"
|
||||
|
||||
.syntax unified
|
||||
/****************************************************************************
|
||||
* void channel_mode_proc_mono(struct dsp_proc_entry *this,
|
||||
* struct dsp_buffer **buf_p)
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
****************************************************************************/
|
||||
#include "rbcodecconfig.h"
|
||||
|
||||
.syntax unified
|
||||
/****************************************************************************
|
||||
* void sample_output_mono(struct sample_io_data *this,
|
||||
* struct dsp_buffer *src,
|
||||
|
|
|
@ -20,6 +20,8 @@
|
|||
****************************************************************************/
|
||||
#include "config.h"
|
||||
|
||||
.syntax unified
|
||||
|
||||
.data
|
||||
was_aborted:
|
||||
.word 0
|
||||
|
|
6
tools/configure
vendored
6
tools/configure
vendored
|
@ -4533,7 +4533,11 @@ if [ -z "$arch" ]; then
|
|||
elif [ -n "$(echo $cpp_defines | grep -w __arm__)" ]; then
|
||||
arch="arm"
|
||||
# cpp defines like "#define __ARM_ARCH_4TE__ 1" (where we want to extract the 4)
|
||||
arch_version="$(echo $cpp_defines | tr ' ' '\012' | grep __ARM_ARCH | sed -e 's,.*\([0-9]\).*,\1,' | grep -v __ARM_ARCH)"
|
||||
arch_version="$(echo $cpp_defines | tr ' ' '\012' | grep __ARM_ARCH | sed -e 's,.*\([0-9]\).*,\1,' | grep -v __ARM_ARCH | head -1)"
|
||||
if test "$gccnum" -ge "800"; then
|
||||
# GCC8+ can natively emit unified asm syntax
|
||||
GCCOPTS="$GCCOPTS -masm-syntax-unified"
|
||||
fi
|
||||
elif [ -n "$(echo $cpp_defines | grep -w __mips__)" ]; then
|
||||
arch="mips"
|
||||
arch_version="$(echo $cpp_defines | tr ' ' '\012' | grep _MIPS_ARCH_MIPS | sed -e 's,.*\([0-9][0-9]\).*,\1,' | grep -v _MIPS_ARCH_MIPS)"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue