aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2005-02-12 00:13:33 +0000
committerH.J. Lu <hjl.tools@gmail.com>2005-02-12 00:13:33 +0000
commit07450571864fbcc902268dac8cfb90cfa8533289 (patch)
treeaa1b6f73a1dbb44abce83cd93a18ad94a8ac37ee /gas
parent6d678bd3753729d24a377a6ee3909f20b278af90 (diff)
downloadfsf-binutils-gdb-07450571864fbcc902268dac8cfb90cfa8533289.zip
fsf-binutils-gdb-07450571864fbcc902268dac8cfb90cfa8533289.tar.gz
fsf-binutils-gdb-07450571864fbcc902268dac8cfb90cfa8533289.tar.bz2
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.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog8
-rw-r--r--gas/config/tc-ia64.c46
2 files changed, 46 insertions, 8 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 01eb42a..2a9dd66 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,5 +1,13 @@
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>
+
(dot_xdata): Undo the last change. Section name is used by
set_section.
(dot_float_cons): Likewise.
diff --git a/gas/config/tc-ia64.c b/gas/config/tc-ia64.c
index 2fb49d7..d65218a 100644
--- a/gas/config/tc-ia64.c
+++ b/gas/config/tc-ia64.c
@@ -3055,50 +3055,80 @@ dot_special_section (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)
{
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
{
as_bad (".%s outside of %s", directive, region);
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
in_procedure (const char *directive)
{
if (unwind.proc_start
&& (!unwind.saved_text_seg || strcmp (directive, "endp") == 0))
return 1;
- unwind_diagnostic ("procedure", directive);
- return 0;
+ return unwind_diagnostic ("procedure", directive);
}
+/* 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
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. */
if (unwind.prologue)
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 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
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. */
if (unwind.body)
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;
}