Commit c9d9bc85 by Richard Earnshaw

aout.h (ASM_OUTPUT_MI_THUNK): Delete.

* aout.h (ASM_OUTPUT_MI_THUNK): Delete.
(ASM_OUTPUT_OPTIONS): Define.
(ASM_FILE_START): Call ASM_OUTPUT_OPTIONS.
(BSS_SECTION_OP): Define.
(ASM_OUTPUT_ALIGN): Don't output anything if byte alignment is wanted.
(ASM_OUTPUT_ALIGNED_BSS): Define.

From-SVN: r11923
parent 4e574e82
...@@ -23,12 +23,18 @@ Boston, MA 02111-1307, USA. */ ...@@ -23,12 +23,18 @@ Boston, MA 02111-1307, USA. */
#define ARM_OS_NAME "(generic)" #define ARM_OS_NAME "(generic)"
#endif #endif
#define ASM_OUTPUT_OPTIONS(FILE) \
output_options(FILE, \
f_options, sizeof (f_options) / sizeof (f_options[0]), \
W_options, sizeof (W_options) / sizeof (W_options[0]))
/* The text to go at the start of the assembler file */ /* The text to go at the start of the assembler file */
#define ASM_FILE_START(STREAM) \ #define ASM_FILE_START(STREAM) \
{ \ { \
extern char *version_string; \ extern char *version_string; \
fprintf (STREAM,"%s Generated by gcc %s for ARM/%s\n", \ fprintf (STREAM,"%s Generated by gcc %s for ARM/%s\n", \
ASM_COMMENT_START, version_string, ARM_OS_NAME); \ ASM_COMMENT_START, version_string, ARM_OS_NAME); \
ASM_OUTPUT_OPTIONS(STREAM); \
fprintf (STREAM,"%srfp\t.req\t%sr9\n", REGISTER_PREFIX, REGISTER_PREFIX); \ fprintf (STREAM,"%srfp\t.req\t%sr9\n", REGISTER_PREFIX, REGISTER_PREFIX); \
fprintf (STREAM,"%ssl\t.req\t%sr10\n", REGISTER_PREFIX, REGISTER_PREFIX); \ fprintf (STREAM,"%ssl\t.req\t%sr10\n", REGISTER_PREFIX, REGISTER_PREFIX); \
fprintf (STREAM,"%sfp\t.req\t%sr11\n", REGISTER_PREFIX, REGISTER_PREFIX); \ fprintf (STREAM,"%sfp\t.req\t%sr11\n", REGISTER_PREFIX, REGISTER_PREFIX); \
...@@ -44,6 +50,7 @@ Boston, MA 02111-1307, USA. */ ...@@ -44,6 +50,7 @@ Boston, MA 02111-1307, USA. */
/* Switch to the text or data segment. */ /* Switch to the text or data segment. */
#define TEXT_SECTION_ASM_OP ".text" #define TEXT_SECTION_ASM_OP ".text"
#define DATA_SECTION_ASM_OP ".data" #define DATA_SECTION_ASM_OP ".data"
#define BSS_SECTION_ASM_OP ".bss"
#define REGISTER_PREFIX "" #define REGISTER_PREFIX ""
#define USER_LABEL_PREFIX "_" #define USER_LABEL_PREFIX "_"
...@@ -227,7 +234,7 @@ do { char dstr[30]; \ ...@@ -227,7 +234,7 @@ do { char dstr[30]; \
\ \
if (amount == 2) \ if (amount == 2) \
fprintf (STREAM, "\t.even\n"); \ fprintf (STREAM, "\t.even\n"); \
else \ else if (amount != 1) \
fprintf (STREAM, "\t.align\t%d\n", amount - 4); \ fprintf (STREAM, "\t.align\t%d\n", amount - 4); \
\ \
if (in_text_section ()) \ if (in_text_section ()) \
...@@ -243,8 +250,12 @@ do { char dstr[30]; \ ...@@ -243,8 +250,12 @@ do { char dstr[30]; \
/* Output a local common block. /bin/as can't do this, so hack a `.space' into /* Output a local common block. /bin/as can't do this, so hack a `.space' into
the bss segment. Note that this is *bad* practice. */ the bss segment. Note that this is *bad* practice. */
#define ASM_OUTPUT_LOCAL(STREAM,NAME,SIZE,ROUNDED) \ #define ASM_OUTPUT_ALIGNED_LOCAL(STREAM,NAME,SIZE,ALIGN) \
output_lcomm_directive (STREAM, NAME, SIZE, ROUNDED) output_lcomm_directive (STREAM, NAME, SIZE, ALIGN)
/* Output a zero-initialized block. */
#define ASM_OUTPUT_ALIGNED_BSS(STREAM,NAME,SIZE,ALIGN) \
asm_output_aligned_bss(STREAM, NAME, SIZE, ALIGN)
/* Output a source line for the debugger. */ /* Output a source line for the debugger. */
/* #define ASM_OUTPUT_SOURCE_LINE(STREAM,LINE) */ /* #define ASM_OUTPUT_SOURCE_LINE(STREAM,LINE) */
...@@ -261,25 +272,4 @@ do { char dstr[30]; \ ...@@ -261,25 +272,4 @@ do { char dstr[30]; \
#define ASM_COMMENT_START "@" #define ASM_COMMENT_START "@"
#endif #endif
/* Output code to add DELTA to the first argument, and then jump to FUNCTION.
Used for C++ multiple inheritance. */
#define ASM_OUTPUT_MI_THUNK(FILE, THUNK_FNDECL, DELTA, FUNCTION) \
do { \
int mi_delta = (DELTA); \
char *mi_op = mi_delta < 0 ? "sub" : "add"; \
unsigned int mi_mask = 0xff000000; \
if (mi_delta < 0) mi_delta = -mi_delta; \
while (mi_mask) \
{ \
if (mi_delta & mi_mask) \
fprintf (FILE, "\t%s %s, %s, #%d\n", \
mi_op, reg_names[0], reg_names[0], mi_delta & mi_mask); \
arm_increase_location (4); \
mi_mask >>= 8; \
} \
fprintf (FILE, "\tldr pc, 1f\n1:"); \
arm_increase_location (4); \
ASM_OUTPUT_INT (FILE, XEXP (DECL_RTL (FUNCTION), 0)); \
} while (0)
#include "arm/arm.h" #include "arm/arm.h"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment