Commit 1c22488e by David Malcolm Committed by David Malcolm

error_for_asm and warning_for_asm take const rtx_insn *

gcc/ChangeLog:
2014-09-10  David Malcolm  <dmalcolm@redhat.com>

	* final.c (this_is_asm_operands): Strengthen this variable from
	rtx to const rtx_insn *.
	* output.h (this_is_asm_operands): Likewise.
	* rtl-error.c (location_for_asm): Strengthen param "insn" from
	const_rtx to const rtx_insn *.
	(diagnostic_for_asm): Likewise.
	* rtl-error.h (error_for_asm): Likewise.
	(warning_for_asm): Likewise.

From-SVN: r215133
parent d0bffe55
2014-09-10 David Malcolm <dmalcolm@redhat.com> 2014-09-10 David Malcolm <dmalcolm@redhat.com>
* final.c (this_is_asm_operands): Strengthen this variable from
rtx to const rtx_insn *.
* output.h (this_is_asm_operands): Likewise.
* rtl-error.c (location_for_asm): Strengthen param "insn" from
const_rtx to const rtx_insn *.
(diagnostic_for_asm): Likewise.
* rtl-error.h (error_for_asm): Likewise.
(warning_for_asm): Likewise.
2014-09-10 David Malcolm <dmalcolm@redhat.com>
* genextract.c (print_header): When writing out insn_extract to * genextract.c (print_header): When writing out insn_extract to
insn-extract.c, strengthen the param "insn" from rtx to rtx_insn *. insn-extract.c, strengthen the param "insn" from rtx to rtx_insn *.
* recog.h (insn_extract): Strengthen the param from rtx to * recog.h (insn_extract): Strengthen the param from rtx to
...@@ -151,7 +151,7 @@ extern const int length_unit_log; /* This is defined in insn-attrtab.c. */ ...@@ -151,7 +151,7 @@ extern const int length_unit_log; /* This is defined in insn-attrtab.c. */
/* Nonzero while outputting an `asm' with operands. /* Nonzero while outputting an `asm' with operands.
This means that inconsistencies are the user's fault, so don't die. This means that inconsistencies are the user's fault, so don't die.
The precise value is the insn being output, to pass to error_for_asm. */ The precise value is the insn being output, to pass to error_for_asm. */
rtx this_is_asm_operands; const rtx_insn *this_is_asm_operands;
/* Number of operands of this insn, for an `asm' with operands. */ /* Number of operands of this insn, for an `asm' with operands. */
static unsigned int insn_noperands; static unsigned int insn_noperands;
......
...@@ -328,7 +328,7 @@ extern rtx_insn *current_output_insn; ...@@ -328,7 +328,7 @@ extern rtx_insn *current_output_insn;
/* Nonzero while outputting an `asm' with operands. /* Nonzero while outputting an `asm' with operands.
This means that inconsistencies are the user's fault, so don't die. This means that inconsistencies are the user's fault, so don't die.
The precise value is the insn being output, to pass to error_for_asm. */ The precise value is the insn being output, to pass to error_for_asm. */
extern rtx this_is_asm_operands; extern const rtx_insn *this_is_asm_operands;
/* Carry information from ASM_DECLARE_OBJECT_NAME /* Carry information from ASM_DECLARE_OBJECT_NAME
to ASM_FINISH_DECLARE_OBJECT. */ to ASM_FINISH_DECLARE_OBJECT. */
......
...@@ -29,12 +29,13 @@ along with GCC; see the file COPYING3. If not see ...@@ -29,12 +29,13 @@ along with GCC; see the file COPYING3. If not see
#include "intl.h" #include "intl.h"
#include "diagnostic.h" #include "diagnostic.h"
static location_t location_for_asm (const_rtx); static location_t location_for_asm (const rtx_insn *);
static void diagnostic_for_asm (const_rtx, const char *, va_list *, diagnostic_t) ATTRIBUTE_GCC_DIAG(2,0); static void diagnostic_for_asm (const rtx_insn *, const char *, va_list *,
diagnostic_t) ATTRIBUTE_GCC_DIAG(2,0);
/* Figure the location of the given INSN. */ /* Figure the location of the given INSN. */
static location_t static location_t
location_for_asm (const_rtx insn) location_for_asm (const rtx_insn *insn)
{ {
rtx body = PATTERN (insn); rtx body = PATTERN (insn);
rtx asmop; rtx asmop;
...@@ -65,7 +66,7 @@ location_for_asm (const_rtx insn) ...@@ -65,7 +66,7 @@ location_for_asm (const_rtx insn)
of the insn INSN. This is used only when INSN is an `asm' with operands, of the insn INSN. This is used only when INSN is an `asm' with operands,
and each ASM_OPERANDS records its own source file and line. */ and each ASM_OPERANDS records its own source file and line. */
static void static void
diagnostic_for_asm (const_rtx insn, const char *msg, va_list *args_ptr, diagnostic_for_asm (const rtx_insn *insn, const char *msg, va_list *args_ptr,
diagnostic_t kind) diagnostic_t kind)
{ {
diagnostic_info diagnostic; diagnostic_info diagnostic;
...@@ -76,7 +77,7 @@ diagnostic_for_asm (const_rtx insn, const char *msg, va_list *args_ptr, ...@@ -76,7 +77,7 @@ diagnostic_for_asm (const_rtx insn, const char *msg, va_list *args_ptr,
} }
void void
error_for_asm (const_rtx insn, const char *gmsgid, ...) error_for_asm (const rtx_insn *insn, const char *gmsgid, ...)
{ {
va_list ap; va_list ap;
...@@ -86,7 +87,7 @@ error_for_asm (const_rtx insn, const char *gmsgid, ...) ...@@ -86,7 +87,7 @@ error_for_asm (const_rtx insn, const char *gmsgid, ...)
} }
void void
warning_for_asm (const_rtx insn, const char *gmsgid, ...) warning_for_asm (const rtx_insn *insn, const char *gmsgid, ...)
{ {
va_list ap; va_list ap;
......
...@@ -20,5 +20,7 @@ along with GCC; see the file COPYING3. If not see ...@@ -20,5 +20,7 @@ along with GCC; see the file COPYING3. If not see
#include "rtl.h" #include "rtl.h"
#include "diagnostic-core.h" #include "diagnostic-core.h"
extern void error_for_asm (const_rtx, const char *, ...) ATTRIBUTE_GCC_DIAG(2,3); extern void error_for_asm (const rtx_insn *, const char *,
extern void warning_for_asm (const_rtx, const char *, ...) ATTRIBUTE_GCC_DIAG(2,3); ...) ATTRIBUTE_GCC_DIAG(2,3);
extern void warning_for_asm (const rtx_insn *, const char *,
...) ATTRIBUTE_GCC_DIAG(2,3);
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