diff options
Diffstat (limited to 'contrib/gcc/config/arm/aof.h')
-rw-r--r-- | contrib/gcc/config/arm/aof.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/contrib/gcc/config/arm/aof.h b/contrib/gcc/config/arm/aof.h index 750bc08..f110ea2 100644 --- a/contrib/gcc/config/arm/aof.h +++ b/contrib/gcc/config/arm/aof.h @@ -120,6 +120,10 @@ do { \ (*ptr++) (); \ } while (0) +/* We really want to put Thumb tables in a read-only data section, but + switching to another section during function output is not + possible. We could however do what the SPARC does and defer the + whole table generation until the end of the function. */ #define JUMP_TABLES_IN_TEXT_SECTION 1 #ifndef ARM_OS_NAME @@ -322,8 +326,13 @@ do { \ /* Output of Dispatch Tables */ -#define ASM_OUTPUT_ADDR_DIFF_ELT(STREAM,BODY,VALUE,REL) \ - fprintf ((STREAM), "\tb\t|L..%d|\n", (VALUE)) +#define ASM_OUTPUT_ADDR_DIFF_ELT(STREAM,BODY,VALUE,REL) \ + do { \ + if (TARGET_ARM) \ + fprintf ((STREAM), "\tb\t|L..%d|\n", (VALUE)); \ + else \ + fprintf ((STREAM), "\tDCD\t|L..%d| - |L..%d|\n", (VALUE), (REL)); \ + } while (0) #define ASM_OUTPUT_ADDR_VEC_ELT(STREAM,VALUE) \ fprintf ((STREAM), "\tDCD\t|L..%d|\n", (VALUE)) |