Commit 314fc5a9 by Ian Lance Taylor

(output_epilog): Don't output a traceback table if

flag_inhibit_size_directive is set.

From-SVN: r6551
parent b0634e74
...@@ -1583,7 +1583,17 @@ output_epilog (file, size) ...@@ -1583,7 +1583,17 @@ output_epilog (file, size)
} }
/* Output a traceback table here. See /usr/include/sys/debug.h for info /* Output a traceback table here. See /usr/include/sys/debug.h for info
on its format. */ on its format.
We don't output a traceback table if -finhibit-size-directive was
used. The documentation for -finhibit-size-directive reads
``don't output a @code{.size} assembler directive, or anything
else that would cause trouble if the function is split in the
middle, and the two halves are placed at locations far apart in
memory.'' The traceback table has this property, since it
includes the offset from the start of the function to the
traceback table itself. */
if (! flag_inhibit_size_directive)
{ {
char *fname = XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0); char *fname = XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0);
int fixed_parms, float_parms, parm_info; int fixed_parms, float_parms, parm_info;
...@@ -1597,23 +1607,25 @@ output_epilog (file, size) ...@@ -1597,23 +1607,25 @@ output_epilog (file, size)
ASM_OUTPUT_LABEL (file, fname); ASM_OUTPUT_LABEL (file, fname);
/* The .tbtab pseudo-op can only be used for the first eight /* The .tbtab pseudo-op can only be used for the first eight
expressions, since it can't handle the possibly variable length expressions, since it can't handle the possibly variable
fields that follow. However, if you omit the optional fields, length fields that follow. However, if you omit the optional
the assembler outputs zeros for all optional fields anyways, giving each fields, the assembler outputs zeros for all optional fields
variable length field is minimum length (as defined in sys/debug.h). anyways, giving each variable length field is minimum length
Thus we can not use the .tbtab pseudo-op at all. */ (as defined in sys/debug.h). Thus we can not use the .tbtab
pseudo-op at all. */
/* An all-zero word flags the start of the tbtab, for debuggers that have
to find it by searching forward from the entry point or from the /* An all-zero word flags the start of the tbtab, for debuggers
current pc. */ that have to find it by searching forward from the entry
point or from the current pc. */
fprintf (file, "\t.long 0\n"); fprintf (file, "\t.long 0\n");
/* Tbtab format type. Use format type 0. */ /* Tbtab format type. Use format type 0. */
fprintf (file, "\t.byte 0,"); fprintf (file, "\t.byte 0,");
/* Language type. Unfortunately, there doesn't seem to be any official way /* Language type. Unfortunately, there doesn't seem to be any
to get this info, so we use language_string. C is 0. C++ is 9. official way to get this info, so we use language_string. C
No number defined for Obj-C, so use the value for C for now. */ is 0. C++ is 9. No number defined for Obj-C, so use the
value for C for now. */
if (! strcmp (language_string, "GNU C") if (! strcmp (language_string, "GNU C")
|| ! strcmp (language_string, "GNU Obj-C")) || ! strcmp (language_string, "GNU Obj-C"))
i = 0; i = 0;
...@@ -1637,9 +1649,10 @@ output_epilog (file, size) ...@@ -1637,9 +1649,10 @@ output_epilog (file, size)
/* Assume that fp operations are used if any fp reg must be saved. */ /* Assume that fp operations are used if any fp reg must be saved. */
fprintf (file, "%d,", (1 << 5) | ((first_fp_reg != 64) << 1)); fprintf (file, "%d,", (1 << 5) | ((first_fp_reg != 64) << 1));
/* 6 bitfields: function is interrupt handler, name present in proc table, /* 6 bitfields: function is interrupt handler, name present in
function calls alloca, on condition directives (controls stack walks, proc table, function calls alloca, on condition directives
3 bits), saves condition reg, saves link reg. */ (controls stack walks, 3 bits), saves condition reg, saves
link reg. */
/* The `function calls alloca' bit seems to be set whenever reg 31 is /* The `function calls alloca' bit seems to be set whenever reg 31 is
set up as a frame pointer, even when there is no alloca call. */ set up as a frame pointer, even when there is no alloca call. */
fprintf (file, "%d,", fprintf (file, "%d,",
...@@ -1655,7 +1668,8 @@ output_epilog (file, size) ...@@ -1655,7 +1668,8 @@ output_epilog (file, size)
fprintf (file, "%d,", (32 - first_reg_to_save ())); fprintf (file, "%d,", (32 - first_reg_to_save ()));
{ {
/* Compute the parameter info from the function decl argument list. */ /* Compute the parameter info from the function decl argument
list. */
tree decl; tree decl;
int next_parm_info_bit; int next_parm_info_bit;
...@@ -1692,7 +1706,8 @@ output_epilog (file, size) ...@@ -1692,7 +1706,8 @@ output_epilog (file, size)
} }
else else
{ {
fixed_parms += ((GET_MODE_SIZE (mode) + (UNITS_PER_WORD - 1)) fixed_parms += ((GET_MODE_SIZE (mode)
+ (UNITS_PER_WORD - 1))
/ UNITS_PER_WORD); / UNITS_PER_WORD);
next_parm_info_bit -= 1; next_parm_info_bit -= 1;
} }
...@@ -1735,7 +1750,8 @@ output_epilog (file, size) ...@@ -1735,7 +1750,8 @@ output_epilog (file, size)
fprintf (file, "\n"); fprintf (file, "\n");
/* Interrupt handler mask. */ /* Interrupt handler mask. */
/* Omit this long, since we never set the interrupt handler bit above. */ /* Omit this long, since we never set the interrupt handler bit
above. */
/* Number of CTL (controlled storage) anchors. */ /* Number of CTL (controlled storage) anchors. */
/* Omit this long, since the has_ctl bit is never set above. */ /* Omit this long, since the has_ctl bit is never set above. */
......
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