diff options
Diffstat (limited to 'gcc/config/arm/arm.c')
-rw-r--r-- | gcc/config/arm/arm.c | 100 |
1 files changed, 46 insertions, 54 deletions
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index 95fe7fe48f1..063055c335e 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -373,7 +373,7 @@ const char * structure_size_string = NULL; int arm_structure_size_boundary = DEFAULT_STRUCTURE_SIZE_BOUNDARY; /* Used for Thumb call_via trampolines. */ -rtx thumb_call_via_label[13]; +rtx thumb_call_via_label[14]; static int thumb_call_reg_needed; /* Bit values used to identify processor capabilities. */ @@ -2283,7 +2283,8 @@ arm_canonicalize_comparison (enum rtx_code code, rtx * op1) /* Define how to find the value returned by a function. */ -rtx arm_function_value(tree type, tree func ATTRIBUTE_UNUSED) +rtx +arm_function_value(tree type, tree func ATTRIBUTE_UNUSED) { enum machine_mode mode; int unsignedp ATTRIBUTE_UNUSED; @@ -2297,6 +2298,28 @@ rtx arm_function_value(tree type, tree func ATTRIBUTE_UNUSED) return LIBCALL_VALUE(mode); } +/* Determine the amount of memory needed to store the possible return + registers of an untyped call. */ +int +arm_apply_result_size (void) +{ + int size = 16; + + if (TARGET_ARM) + { + if (TARGET_HARD_FLOAT_ABI) + { + if (TARGET_FPA) + size += 12; + if (TARGET_MAVERICK) + size += 8; + } + if (TARGET_IWMMXT_ABI) + size += 8; + } + + return size; +} /* Decide whether a type should be returned in memory (true) or in a register (false). This is called by the macro @@ -8634,8 +8657,14 @@ int_log2 (HOST_WIDE_INT power) return shift; } -/* Output a .ascii pseudo-op, keeping track of lengths. This is because - /bin/as is horribly restrictive. */ +/* Output a .ascii pseudo-op, keeping track of lengths. This is + because /bin/as is horribly restrictive. The judgement about + whether or not each character is 'printable' (and can be output as + is) or not (and must be printed with an octal escape) must be made + with reference to the *host* character set -- the situation is + similar to that discussed in the comments above pp_c_char in + c-pretty-print.c. */ + #define MAX_ASCII_LEN 51 void @@ -8656,57 +8685,20 @@ output_ascii_pseudo_op (FILE *stream, const unsigned char *p, int len) len_so_far = 0; } - switch (c) + if (ISPRINT (c)) { - case TARGET_TAB: - fputs ("\\t", stream); - len_so_far += 2; - break; - - case TARGET_FF: - fputs ("\\f", stream); - len_so_far += 2; - break; - - case TARGET_BS: - fputs ("\\b", stream); - len_so_far += 2; - break; - - case TARGET_CR: - fputs ("\\r", stream); - len_so_far += 2; - break; - - case TARGET_NEWLINE: - fputs ("\\n", stream); - c = p [i + 1]; - if ((c >= ' ' && c <= '~') - || c == TARGET_TAB) - /* This is a good place for a line break. */ - len_so_far = MAX_ASCII_LEN; - else - len_so_far += 2; - break; - - case '\"': - case '\\': - putc ('\\', stream); - len_so_far++; - /* Drop through. */ - - default: - if (c >= ' ' && c <= '~') + if (c == '\\' || c == '\"') { - putc (c, stream); + putc ('\\', stream); len_so_far++; } - else - { - fprintf (stream, "\\%03o", c); - len_so_far += 4; - } - break; + putc (c, stream); + len_so_far++; + } + else + { + fprintf (stream, "\\%03o", c); + len_so_far += 4; } } @@ -9632,7 +9624,7 @@ arm_output_function_epilogue (FILE *file ATTRIBUTE_UNUSED, /* Emit any call-via-reg trampolines that are needed for v4t support of call_reg and call_value_reg type insns. */ - for (regno = 0; regno < SP_REGNUM; regno++) + for (regno = 0; regno < LR_REGNUM; regno++) { rtx label = cfun->machine->call_via[regno]; @@ -13704,7 +13696,7 @@ thumb_call_via_reg (rtx reg) int regno = REGNO (reg); rtx *labelp; - gcc_assert (regno < SP_REGNUM); + gcc_assert (regno < LR_REGNUM); /* If we are in the normal text section we can use a single instance per compilation unit. If we are doing function sections, then we need @@ -13850,7 +13842,7 @@ arm_file_end (void) asm_fprintf (asm_out_file, "\t.code 16\n"); ASM_OUTPUT_ALIGN (asm_out_file, 1); - for (regno = 0; regno < SP_REGNUM; regno++) + for (regno = 0; regno < LR_REGNUM; regno++) { rtx label = thumb_call_via_label[regno]; |