aboutsummaryrefslogtreecommitdiff
path: root/gcc/rtl.def
diff options
context:
space:
mode:
authorPer Bothner <per@bothner.com>2004-06-30 10:58:21 -0700
committerPer Bothner <bothner@gcc.gnu.org>2004-06-30 10:58:21 -0700
commitc166747038bc41ee6702618828e5c915cc4e47ea (patch)
treebf7c0b00dcfa76e28cdeb61f5339d2924ef9dc16 /gcc/rtl.def
parentb5674962f18be68ae4b22042b09fd251ccd09ed1 (diff)
downloadgcc-c166747038bc41ee6702618828e5c915cc4e47ea.zip
gcc-c166747038bc41ee6702618828e5c915cc4e47ea.tar.gz
gcc-c166747038bc41ee6702618828e5c915cc4e47ea.tar.bz2
Conditionally compile support for --enable-mapped_location.
* input.h: #include line-map.h for source_location typedef. (BUILTINS_LOCATION, UNKNOWN_LOCATION, expand_location, LOCATION_FILE, LOCATION_LINE): New macros and functions. (expanded_location, source_locus): New typedefs. (push_srcloc): Change parameter list if USE_MAPPED_LOCATION. * rtl.def (NOTE, ASM_OPERANDS): Modify specifcation, if USE_MAPPED_LOCATION. * rtl.h (NOTE_DELETED_LABEL_NAME): New macro. (NOTE_SOURCE_LOCATION, NOTE_EXPNDED_LOCATION, SET_INSN_DELETED): New conditional macros. (ASM_OPERANDS_SOURCE_FILE, ASM_OPERANDS_SOURCE_LINE): Replace by ASM_OPERANDS_SOURCE_LOCATION if USE_MAPPED_LOCATION. * tree.h (EXPR_LOCATION, SET_EXPR_LOCATION, EXPR_HAS_LOCATION, EXPR_LOCUS, SET_EXPR_LOCUS, EXPR_FILENAME, EXPR_LINENO, DECL_IS_BUILTIN): New macros, most depending on USE_MAPPED__LOCATION. (tree_exp): Change type of locus to use new source_locus typedef. * tree.c (build1_stat): Use SET_EXPR_LOCATION. (annotate_with_locus, annotate_with_file_line): Conditionalize. (expand_location): New function. * toplev.c (unknown_location): New static, when USE_MAPPED_LOCATION. (push_srcloc, pop_loc): Adjust parameter handling. (process_options): Don't set input_filename by itself. (lang_dependent_init): Save, set input_location to <built-in>. (warn_deprecated_use): Use expand_location. From-SVN: r83918
Diffstat (limited to 'gcc/rtl.def')
-rw-r--r--gcc/rtl.def23
1 files changed, 23 insertions, 0 deletions
diff --git a/gcc/rtl.def b/gcc/rtl.def
index be86bfc..6881b6f 100644
--- a/gcc/rtl.def
+++ b/gcc/rtl.def
@@ -640,11 +640,19 @@ DEF_RTL_EXPR(BARRIER, "barrier", "iuu000000", RTX_EXTRA)
7: is the user-given name of the label, if any. */
DEF_RTL_EXPR(CODE_LABEL, "code_label", "iuuB00is", RTX_EXTRA)
+#ifdef USE_MAPPED_LOCATION
+/* Say where in the code a source line starts, for symbol table's sake.
+ Operand:
+ 4: unused if line number > 0, note-specific data otherwise.
+ 5: line number if > 0, enum note_insn otherwise.
+ 6: CODE_LABEL_NUMBER if line number == NOTE_INSN_DELETED_LABEL. */
+#else
/* Say where in the code a source line starts, for symbol table's sake.
Operand:
4: filename, if line number > 0, note-specific data otherwise.
5: line number if > 0, enum note_insn otherwise.
6: unique number if line number == note_insn_deleted_label. */
+#endif
DEF_RTL_EXPR(NOTE, "note", "iuuB0ni", RTX_EXTRA)
/* ----------------------------------------------------------------------
@@ -671,6 +679,20 @@ DEF_RTL_EXPR(PARALLEL, "parallel", "E", RTX_EXTRA)
as a convenient way to hold a string. */
DEF_RTL_EXPR(ASM_INPUT, "asm_input", "s", RTX_EXTRA)
+#ifdef USE_MAPPED_LOCATION
+/* An assembler instruction with operands.
+ 1st operand is the instruction template.
+ 2nd operand is the constraint for the output.
+ 3rd operand is the number of the output this expression refers to.
+ When an insn stores more than one value, a separate ASM_OPERANDS
+ is made for each output; this integer distinguishes them.
+ 4th is a vector of values of input operands.
+ 5th is a vector of modes and constraints for the input operands.
+ Each element is an ASM_INPUT containing a constraint string
+ and whose mode indicates the mode of the input operand.
+ 6th is the source line number. */
+DEF_RTL_EXPR(ASM_OPERANDS, "asm_operands", "ssiEEi", RTX_EXTRA)
+#else
/* An assembler instruction with operands.
1st operand is the instruction template.
2nd operand is the constraint for the output.
@@ -684,6 +706,7 @@ DEF_RTL_EXPR(ASM_INPUT, "asm_input", "s", RTX_EXTRA)
6th is the name of the containing source file.
7th is the source line number. */
DEF_RTL_EXPR(ASM_OPERANDS, "asm_operands", "ssiEEsi", RTX_EXTRA)
+#endif
/* A machine-specific operation.
1st operand is a vector of operands being used by the operation so that