mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-27 06:17:47 +08:00
2005-02-11 H.J. Lu <hongjiu.lu@intel.com>
* config/tc-ia64.c (unwind_diagnostic): Return -1 for warning and 0 for error. (in_procedure): Return -1 for warning. (in_prologue): Likewise. (in_body): Likewise.
This commit is contained in:
@ -1,3 +1,11 @@
|
|||||||
|
2005-02-11 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
|
* config/tc-ia64.c (unwind_diagnostic): Return -1 for warning
|
||||||
|
and 0 for error.
|
||||||
|
(in_procedure): Return -1 for warning.
|
||||||
|
(in_prologue): Likewise.
|
||||||
|
(in_body): Likewise.
|
||||||
|
|
||||||
2005-02-11 H.J. Lu <hongjiu.lu@intel.com>
|
2005-02-11 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
(dot_xdata): Undo the last change. Section name is used by
|
(dot_xdata): Undo the last change. Section name is used by
|
||||||
|
@ -3055,50 +3055,80 @@ dot_special_section (which)
|
|||||||
set_section ((char *) special_section_name[which]);
|
set_section ((char *) special_section_name[which]);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
/* Return -1 for warning and 0 for error. */
|
||||||
|
|
||||||
|
static int
|
||||||
unwind_diagnostic (const char * region, const char *directive)
|
unwind_diagnostic (const char * region, const char *directive)
|
||||||
{
|
{
|
||||||
if (md.unwind_check == unwind_check_warning)
|
if (md.unwind_check == unwind_check_warning)
|
||||||
as_warn (".%s outside of %s", directive, region);
|
{
|
||||||
|
as_warn (".%s outside of %s", directive, region);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
as_bad (".%s outside of %s", directive, region);
|
as_bad (".%s outside of %s", directive, region);
|
||||||
ignore_rest_of_line ();
|
ignore_rest_of_line ();
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Return 1 if a directive is in a procedure, -1 if a directive isn't in
|
||||||
|
a procedure but the unwind directive check is set to warning, 0 if
|
||||||
|
a directive isn't in a procedure and the unwind directive check is set
|
||||||
|
to error. */
|
||||||
|
|
||||||
static int
|
static int
|
||||||
in_procedure (const char *directive)
|
in_procedure (const char *directive)
|
||||||
{
|
{
|
||||||
if (unwind.proc_start
|
if (unwind.proc_start
|
||||||
&& (!unwind.saved_text_seg || strcmp (directive, "endp") == 0))
|
&& (!unwind.saved_text_seg || strcmp (directive, "endp") == 0))
|
||||||
return 1;
|
return 1;
|
||||||
unwind_diagnostic ("procedure", directive);
|
return unwind_diagnostic ("procedure", directive);
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Return 1 if a directive is in a prologue, -1 if a directive isn't in
|
||||||
|
a prologue but the unwind directive check is set to warning, 0 if
|
||||||
|
a directive isn't in a prologue and the unwind directive check is set
|
||||||
|
to error. */
|
||||||
|
|
||||||
static int
|
static int
|
||||||
in_prologue (const char *directive)
|
in_prologue (const char *directive)
|
||||||
{
|
{
|
||||||
if (in_procedure (directive))
|
int in = in_procedure (directive);
|
||||||
|
if (in)
|
||||||
{
|
{
|
||||||
/* We are in a procedure. Check if we are in a prologue. */
|
/* We are in a procedure. Check if we are in a prologue. */
|
||||||
if (unwind.prologue)
|
if (unwind.prologue)
|
||||||
return 1;
|
return 1;
|
||||||
unwind_diagnostic ("prologue", directive);
|
/* We only want to issue one message. */
|
||||||
|
if (in == 1)
|
||||||
|
return unwind_diagnostic ("prologue", directive);
|
||||||
|
else
|
||||||
|
return -1;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Return 1 if a directive is in a body, -1 if a directive isn't in
|
||||||
|
a body but the unwind directive check is set to warning, 0 if
|
||||||
|
a directive isn't in a body and the unwind directive check is set
|
||||||
|
to error. */
|
||||||
|
|
||||||
static int
|
static int
|
||||||
in_body (const char *directive)
|
in_body (const char *directive)
|
||||||
{
|
{
|
||||||
if (in_procedure (directive))
|
int in = in_procedure (directive);
|
||||||
|
if (in)
|
||||||
{
|
{
|
||||||
/* We are in a procedure. Check if we are in a body. */
|
/* We are in a procedure. Check if we are in a body. */
|
||||||
if (unwind.body)
|
if (unwind.body)
|
||||||
return 1;
|
return 1;
|
||||||
unwind_diagnostic ("body region", directive);
|
/* We only want to issue one message. */
|
||||||
|
if (in == 1)
|
||||||
|
return unwind_diagnostic ("body region", directive);
|
||||||
|
else
|
||||||
|
return -1;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user