1 /* RTL utility routines.
2 Copyright (C) 1987-2018 Free Software Foundation, Inc.
4 This file is part of GCC.
6 GCC is free software; you can redistribute it and/or modify it under
7 the terms of the GNU General Public License as published by the Free
8 Software Foundation; either version 3, or (at your option) any later
11 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
12 WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
16 You should have received a copy of the GNU General Public License
17 along with GCC; see the file COPYING3. If not see
18 <http://www.gnu.org/licenses/>. */
20 /* This file is compiled twice: once for the generator programs
21 once for the compiler. */
29 #include "coretypes.h"
36 # include "diagnostic-core.h"
40 /* Indexed by rtx code, gives number of operands for an rtx with that code.
41 Does NOT include rtx header data (code and links). */
43 #define DEF_RTL_EXPR(ENUM, NAME, FORMAT, CLASS) sizeof FORMAT - 1 ,
45 const unsigned char rtx_length
[NUM_RTX_CODE
] = {
51 /* Indexed by rtx code, gives the name of that kind of rtx, as a C string. */
53 #define DEF_RTL_EXPR(ENUM, NAME, FORMAT, CLASS) NAME ,
55 const char * const rtx_name
[NUM_RTX_CODE
] = {
56 #include "rtl.def" /* rtl expressions are documented here */
61 /* Indexed by rtx code, gives a sequence of operand-types for
62 rtx's of that code. The sequence is a C string in which
63 each character describes one operand. */
65 const char * const rtx_format
[NUM_RTX_CODE
] = {
67 can cause a warning message
68 "0" field is unused (or used in a phase-dependent manner)
72 "n" like "i", but prints entries from `note_insn_name'
73 "w" an integer of width HOST_BITS_PER_WIDE_INT
75 "s" a pointer to a string
77 "S" like "s", but optional:
78 the containing rtx may end before this operand
79 "T" like "s", but treated specially by the RTL reader;
80 only found in machine description patterns.
81 "e" a pointer to an rtl expression
83 "E" a pointer to a vector that points to a number of rtl expressions
84 prints a list of the rtl expressions
85 "V" like "E", but optional:
86 the containing rtx may end before this operand
87 "u" a pointer to another insn
88 prints the uid of the insn.
89 "b" is a pointer to a bitmap header.
90 "B" is a basic block pointer.
91 "t" is a tree pointer.
93 "p" is a poly_uint16 offset. */
95 #define DEF_RTL_EXPR(ENUM, NAME, FORMAT, CLASS) FORMAT ,
96 #include "rtl.def" /* rtl expressions are defined here */
100 /* Indexed by rtx code, gives a character representing the "class" of
101 that rtx code. See rtl.def for documentation on the defined classes. */
103 const enum rtx_class rtx_class
[NUM_RTX_CODE
] = {
104 #define DEF_RTL_EXPR(ENUM, NAME, FORMAT, CLASS) CLASS,
105 #include "rtl.def" /* rtl expressions are defined here */
109 /* Indexed by rtx code, gives the size of the rtx in bytes. */
111 const unsigned char rtx_code_size
[NUM_RTX_CODE
] = {
112 #define DEF_RTL_EXPR(ENUM, NAME, FORMAT, CLASS) \
113 (((ENUM) == CONST_INT || (ENUM) == CONST_DOUBLE \
114 || (ENUM) == CONST_FIXED || (ENUM) == CONST_WIDE_INT) \
115 ? RTX_HDR_SIZE + (sizeof FORMAT - 1) * sizeof (HOST_WIDE_INT) \
117 ? RTX_HDR_SIZE + sizeof (reg_info) \
118 : RTX_HDR_SIZE + (sizeof FORMAT - 1) * sizeof (rtunion)),
124 /* Names for kinds of NOTEs and REG_NOTEs. */
126 const char * const note_insn_name
[NOTE_INSN_MAX
] =
128 #define DEF_INSN_NOTE(NAME) #NAME,
129 #include "insn-notes.def"
133 const char * const reg_note_name
[REG_NOTE_MAX
] =
135 #define DEF_REG_NOTE(NAME) #NAME,
136 #include "reg-notes.def"
140 static int rtx_alloc_counts
[(int) LAST_AND_UNUSED_RTX_CODE
];
141 static int rtx_alloc_sizes
[(int) LAST_AND_UNUSED_RTX_CODE
];
142 static int rtvec_alloc_counts
;
143 static int rtvec_alloc_sizes
;
146 /* Allocate an rtx vector of N elements.
147 Store the length, and initialize all elements to zero. */
154 rt
= ggc_alloc_rtvec_sized (n
);
155 /* Clear out the vector. */
156 memset (&rt
->elem
[0], 0, n
* sizeof (rtx
));
158 PUT_NUM_ELEM (rt
, n
);
160 if (GATHER_STATISTICS
)
162 rtvec_alloc_counts
++;
163 rtvec_alloc_sizes
+= n
* sizeof (rtx
);
169 /* Create a bitwise copy of VEC. */
172 shallow_copy_rtvec (rtvec vec
)
177 n
= GET_NUM_ELEM (vec
);
178 newvec
= rtvec_alloc (n
);
179 memcpy (&newvec
->elem
[0], &vec
->elem
[0], sizeof (rtx
) * n
);
183 /* Return the number of bytes occupied by rtx value X. */
186 rtx_size (const_rtx x
)
188 if (CONST_WIDE_INT_P (x
))
190 + sizeof (struct hwivec_def
)
191 + ((CONST_WIDE_INT_NUNITS (x
) - 1)
192 * sizeof (HOST_WIDE_INT
)));
193 if (CONST_POLY_INT_P (x
))
195 + sizeof (struct const_poly_int_def
)
196 + CONST_POLY_INT_COEFFS (x
).extra_size ());
197 if (GET_CODE (x
) == SYMBOL_REF
&& SYMBOL_REF_HAS_BLOCK_INFO_P (x
))
198 return RTX_HDR_SIZE
+ sizeof (struct block_symbol
);
199 return RTX_CODE_SIZE (GET_CODE (x
));
202 /* Allocate an rtx of code CODE with EXTRA bytes in it. The CODE is
203 stored in the rtx; all the rest is initialized to zero. */
206 rtx_alloc_stat_v (RTX_CODE code MEM_STAT_DECL
, int extra
)
208 rtx rt
= ggc_alloc_rtx_def_stat (RTX_CODE_SIZE (code
) + extra
211 /* We want to clear everything up to the FLD array. Normally, this
212 is one int, but we don't want to assume that and it isn't very
213 portable anyway; this is. */
215 memset (rt
, 0, RTX_HDR_SIZE
);
218 if (GATHER_STATISTICS
)
220 rtx_alloc_counts
[code
]++;
221 rtx_alloc_sizes
[code
] += RTX_CODE_SIZE (code
);
227 /* Allocate an rtx of code CODE. The CODE is stored in the rtx;
228 all the rest is initialized to zero. */
231 rtx_alloc (RTX_CODE code MEM_STAT_DECL
)
233 return rtx_alloc_stat_v (code PASS_MEM_STAT
, 0);
236 /* Write the wide constant X to OUTFILE. */
239 cwi_output_hex (FILE *outfile
, const_rtx x
)
241 int i
= CWI_GET_NUM_ELEM (x
);
243 if (CWI_ELT (x
, i
- 1) == 0)
244 /* The HOST_WIDE_INT_PRINT_HEX prepends a 0x only if the val is
245 non zero. We want all numbers to have a 0x prefix. */
246 fprintf (outfile
, "0x");
247 fprintf (outfile
, HOST_WIDE_INT_PRINT_HEX
, CWI_ELT (x
, --i
));
249 fprintf (outfile
, HOST_WIDE_INT_PRINT_PADDED_HEX
, CWI_ELT (x
, i
));
253 /* Return true if ORIG is a sharable CONST. */
256 shared_const_p (const_rtx orig
)
258 gcc_assert (GET_CODE (orig
) == CONST
);
260 /* CONST can be shared if it contains a SYMBOL_REF. If it contains
261 a LABEL_REF, it isn't sharable. */
263 return (GET_CODE (XEXP (orig
, 0)) == PLUS
264 && GET_CODE (XEXP (XEXP (orig
, 0), 0)) == SYMBOL_REF
265 && poly_int_rtx_p (XEXP (XEXP (orig
, 0), 1), &offset
));
269 /* Create a new copy of an rtx.
270 Recursively copies the operands of the rtx,
271 except for those few rtx codes that are sharable. */
279 const char *format_ptr
;
281 code
= GET_CODE (orig
);
296 /* SCRATCH must be shared because they represent distinct values. */
299 /* Share clobbers of hard registers (like cc0), but do not share pseudo reg
300 clobbers or clobbers of hard registers that originated as pseudos.
301 This is needed to allow safe register renaming. */
302 if (REG_P (XEXP (orig
, 0)) && REGNO (XEXP (orig
, 0)) < FIRST_PSEUDO_REGISTER
303 && ORIGINAL_REGNO (XEXP (orig
, 0)) == REGNO (XEXP (orig
, 0)))
308 gcc_assert (REG_P (XEXP (orig
, 0)));
312 if (shared_const_p (orig
))
316 /* A MEM with a constant address is not sharable. The problem is that
317 the constant address may need to be reloaded. If the mem is shared,
318 then reloading one copy of this mem will cause all copies to appear
319 to have been reloaded. */
325 /* Copy the various flags, fields, and other information. We assume
326 that all fields need copying, and then clear the fields that should
327 not be copied. That is the sensible default behavior, and forces
328 us to explicitly document why we are *not* copying a flag. */
329 copy
= shallow_copy_rtx (orig
);
331 format_ptr
= GET_RTX_FORMAT (GET_CODE (copy
));
333 for (i
= 0; i
< GET_RTX_LENGTH (GET_CODE (copy
)); i
++)
334 switch (*format_ptr
++)
337 if (XEXP (orig
, i
) != NULL
)
338 XEXP (copy
, i
) = copy_rtx (XEXP (orig
, i
));
343 if (XVEC (orig
, i
) != NULL
)
345 XVEC (copy
, i
) = rtvec_alloc (XVECLEN (orig
, i
));
346 for (j
= 0; j
< XVECLEN (copy
, i
); j
++)
347 XVECEXP (copy
, i
, j
) = copy_rtx (XVECEXP (orig
, i
, j
));
361 /* These are left unchanged. */
370 /* Create a new copy of an rtx. Only copy just one level. */
373 shallow_copy_rtx (const_rtx orig MEM_STAT_DECL
)
375 const unsigned int size
= rtx_size (orig
);
376 rtx
const copy
= ggc_alloc_rtx_def_stat (size PASS_MEM_STAT
);
377 memcpy (copy
, orig
, size
);
378 switch (GET_CODE (orig
))
380 /* RTX codes copy_rtx_if_shared_1 considers are shareable,
381 the used flag is often used for other purposes. */
395 /* For all other RTXes clear the used flag on the copy. */
396 RTX_FLAG (copy
, used
) = 0;
402 /* Nonzero when we are generating CONCATs. */
403 int generating_concat_p
;
405 /* Nonzero when we are expanding trees to RTL. */
406 int currently_expanding_to_rtl
;
410 /* Same as rtx_equal_p, but call CB on each pair of rtx if CB is not NULL.
411 When the callback returns true, we continue with the new pair.
412 Whenever changing this function check if rtx_equal_p below doesn't need
416 rtx_equal_p_cb (const_rtx x
, const_rtx y
, rtx_equal_p_callback_function cb
)
426 if (x
== 0 || y
== 0)
429 /* Invoke the callback first. */
431 && ((*cb
) (&x
, &y
, &nx
, &ny
)))
432 return rtx_equal_p_cb (nx
, ny
, cb
);
435 /* Rtx's of different codes cannot be equal. */
436 if (code
!= GET_CODE (y
))
439 /* (MULT:SI x y) and (MULT:HI x y) are NOT equivalent.
440 (REG:SI x) and (REG:HI x) are NOT equivalent. */
442 if (GET_MODE (x
) != GET_MODE (y
))
445 /* MEMs referring to different address space are not equivalent. */
446 if (code
== MEM
&& MEM_ADDR_SPACE (x
) != MEM_ADDR_SPACE (y
))
449 /* Some RTL can be compared nonrecursively. */
453 return (REGNO (x
) == REGNO (y
));
456 return label_ref_label (x
) == label_ref_label (y
);
459 return XSTR (x
, 0) == XSTR (y
, 0);
467 case DEBUG_IMPLICIT_PTR
:
468 return DEBUG_IMPLICIT_PTR_DECL (x
)
469 == DEBUG_IMPLICIT_PTR_DECL (y
);
471 case DEBUG_PARAMETER_REF
:
472 return DEBUG_PARAMETER_REF_DECL (x
)
473 == DEBUG_PARAMETER_REF_DECL (y
);
476 return rtx_equal_p_cb (ENTRY_VALUE_EXP (x
), ENTRY_VALUE_EXP (y
), cb
);
482 /* Compare the elements. If any pair of corresponding elements
483 fail to match, return 0 for the whole thing. */
485 fmt
= GET_RTX_FORMAT (code
);
486 for (i
= GET_RTX_LENGTH (code
) - 1; i
>= 0; i
--)
491 if (XWINT (x
, i
) != XWINT (y
, i
))
497 if (XINT (x
, i
) != XINT (y
, i
))
499 #ifndef GENERATOR_FILE
500 if (((code
== ASM_OPERANDS
&& i
== 6)
501 || (code
== ASM_INPUT
&& i
== 1))
502 && XINT (x
, i
) == XINT (y
, i
))
510 if (maybe_ne (SUBREG_BYTE (x
), SUBREG_BYTE (y
)))
516 /* Two vectors must have the same length. */
517 if (XVECLEN (x
, i
) != XVECLEN (y
, i
))
520 /* And the corresponding elements must match. */
521 for (j
= 0; j
< XVECLEN (x
, i
); j
++)
522 if (rtx_equal_p_cb (XVECEXP (x
, i
, j
),
523 XVECEXP (y
, i
, j
), cb
) == 0)
528 if (rtx_equal_p_cb (XEXP (x
, i
), XEXP (y
, i
), cb
) == 0)
534 if ((XSTR (x
, i
) || XSTR (y
, i
))
535 && (! XSTR (x
, i
) || ! XSTR (y
, i
)
536 || strcmp (XSTR (x
, i
), XSTR (y
, i
))))
541 /* These are just backpointers, so they don't matter. */
548 /* It is believed that rtx's at this level will never
549 contain anything but integers and other rtx's,
550 except for within LABEL_REFs and SYMBOL_REFs. */
558 /* Return 1 if X and Y are identical-looking rtx's.
559 This is the Lisp function EQUAL for rtx arguments.
560 Whenever changing this function check if rtx_equal_p_cb above doesn't need
564 rtx_equal_p (const_rtx x
, const_rtx y
)
573 if (x
== 0 || y
== 0)
577 /* Rtx's of different codes cannot be equal. */
578 if (code
!= GET_CODE (y
))
581 /* (MULT:SI x y) and (MULT:HI x y) are NOT equivalent.
582 (REG:SI x) and (REG:HI x) are NOT equivalent. */
584 if (GET_MODE (x
) != GET_MODE (y
))
587 /* MEMs referring to different address space are not equivalent. */
588 if (code
== MEM
&& MEM_ADDR_SPACE (x
) != MEM_ADDR_SPACE (y
))
591 /* Some RTL can be compared nonrecursively. */
595 return (REGNO (x
) == REGNO (y
));
598 return label_ref_label (x
) == label_ref_label (y
);
601 return XSTR (x
, 0) == XSTR (y
, 0);
609 case DEBUG_IMPLICIT_PTR
:
610 return DEBUG_IMPLICIT_PTR_DECL (x
)
611 == DEBUG_IMPLICIT_PTR_DECL (y
);
613 case DEBUG_PARAMETER_REF
:
614 return DEBUG_PARAMETER_REF_DECL (x
)
615 == DEBUG_PARAMETER_REF_DECL (y
);
618 return rtx_equal_p (ENTRY_VALUE_EXP (x
), ENTRY_VALUE_EXP (y
));
624 /* Compare the elements. If any pair of corresponding elements
625 fail to match, return 0 for the whole thing. */
627 fmt
= GET_RTX_FORMAT (code
);
628 for (i
= GET_RTX_LENGTH (code
) - 1; i
>= 0; i
--)
633 if (XWINT (x
, i
) != XWINT (y
, i
))
639 if (XINT (x
, i
) != XINT (y
, i
))
641 #ifndef GENERATOR_FILE
642 if (((code
== ASM_OPERANDS
&& i
== 6)
643 || (code
== ASM_INPUT
&& i
== 1))
644 && XINT (x
, i
) == XINT (y
, i
))
652 if (maybe_ne (SUBREG_BYTE (x
), SUBREG_BYTE (y
)))
658 /* Two vectors must have the same length. */
659 if (XVECLEN (x
, i
) != XVECLEN (y
, i
))
662 /* And the corresponding elements must match. */
663 for (j
= 0; j
< XVECLEN (x
, i
); j
++)
664 if (rtx_equal_p (XVECEXP (x
, i
, j
), XVECEXP (y
, i
, j
)) == 0)
669 if (rtx_equal_p (XEXP (x
, i
), XEXP (y
, i
)) == 0)
675 if ((XSTR (x
, i
) || XSTR (y
, i
))
676 && (! XSTR (x
, i
) || ! XSTR (y
, i
)
677 || strcmp (XSTR (x
, i
), XSTR (y
, i
))))
682 /* These are just backpointers, so they don't matter. */
689 /* It is believed that rtx's at this level will never
690 contain anything but integers and other rtx's,
691 except for within LABEL_REFs and SYMBOL_REFs. */
699 /* Return true if all elements of VEC are equal. */
702 rtvec_all_equal_p (const_rtvec vec
)
704 const_rtx first
= RTVEC_ELT (vec
, 0);
705 /* Optimize the important special case of a vector of constants.
706 The main use of this function is to detect whether every element
707 of CONST_VECTOR is the same. */
708 switch (GET_CODE (first
))
711 for (int i
= 1, n
= GET_NUM_ELEM (vec
); i
< n
; ++i
)
712 if (first
!= RTVEC_ELT (vec
, i
))
717 for (int i
= 1, n
= GET_NUM_ELEM (vec
); i
< n
; ++i
)
718 if (!rtx_equal_p (first
, RTVEC_ELT (vec
, i
)))
724 /* Return an indication of which type of insn should have X as a body.
725 In generator files, this can be UNKNOWN if the answer is only known
726 at (GCC) runtime. Otherwise the value is CODE_LABEL, INSN, CALL_INSN
730 classify_insn (rtx x
)
734 if (GET_CODE (x
) == CALL
)
736 if (ANY_RETURN_P (x
))
738 if (GET_CODE (x
) == SET
)
740 if (GET_CODE (SET_DEST (x
)) == PC
)
742 else if (GET_CODE (SET_SRC (x
)) == CALL
)
747 if (GET_CODE (x
) == PARALLEL
)
750 bool has_return_p
= false;
751 for (j
= XVECLEN (x
, 0) - 1; j
>= 0; j
--)
752 if (GET_CODE (XVECEXP (x
, 0, j
)) == CALL
)
754 else if (ANY_RETURN_P (XVECEXP (x
, 0, j
)))
756 else if (GET_CODE (XVECEXP (x
, 0, j
)) == SET
757 && GET_CODE (SET_DEST (XVECEXP (x
, 0, j
))) == PC
)
759 else if (GET_CODE (XVECEXP (x
, 0, j
)) == SET
760 && GET_CODE (SET_SRC (XVECEXP (x
, 0, j
))) == CALL
)
765 #ifdef GENERATOR_FILE
766 if (GET_CODE (x
) == MATCH_OPERAND
767 || GET_CODE (x
) == MATCH_OPERATOR
768 || GET_CODE (x
) == MATCH_PARALLEL
769 || GET_CODE (x
) == MATCH_OP_DUP
770 || GET_CODE (x
) == MATCH_DUP
771 || GET_CODE (x
) == PARALLEL
)
778 dump_rtx_statistics (void)
781 int total_counts
= 0;
784 if (! GATHER_STATISTICS
)
786 fprintf (stderr
, "No RTX statistics\n");
790 fprintf (stderr
, "\nRTX Kind Count Bytes\n");
791 fprintf (stderr
, "---------------------------------------\n");
792 for (i
= 0; i
< LAST_AND_UNUSED_RTX_CODE
; i
++)
793 if (rtx_alloc_counts
[i
])
795 fprintf (stderr
, "%-20s %7d %10d\n", GET_RTX_NAME (i
),
796 rtx_alloc_counts
[i
], rtx_alloc_sizes
[i
]);
797 total_counts
+= rtx_alloc_counts
[i
];
798 total_sizes
+= rtx_alloc_sizes
[i
];
800 if (rtvec_alloc_counts
)
802 fprintf (stderr
, "%-20s %7d %10d\n", "rtvec",
803 rtvec_alloc_counts
, rtvec_alloc_sizes
);
804 total_counts
+= rtvec_alloc_counts
;
805 total_sizes
+= rtvec_alloc_sizes
;
807 fprintf (stderr
, "---------------------------------------\n");
808 fprintf (stderr
, "%-20s %7d %10d\n",
809 "Total", total_counts
, total_sizes
);
810 fprintf (stderr
, "---------------------------------------\n");
813 #if defined ENABLE_RTL_CHECKING && (GCC_VERSION >= 2007)
815 rtl_check_failed_bounds (const_rtx r
, int n
, const char *file
, int line
,
819 ("RTL check: access of elt %d of '%s' with last elt %d in %s, at %s:%d",
820 n
, GET_RTX_NAME (GET_CODE (r
)), GET_RTX_LENGTH (GET_CODE (r
)) - 1,
821 func
, trim_filename (file
), line
);
825 rtl_check_failed_type1 (const_rtx r
, int n
, int c1
, const char *file
, int line
,
829 ("RTL check: expected elt %d type '%c', have '%c' (rtx %s) in %s, at %s:%d",
830 n
, c1
, GET_RTX_FORMAT (GET_CODE (r
))[n
], GET_RTX_NAME (GET_CODE (r
)),
831 func
, trim_filename (file
), line
);
835 rtl_check_failed_type2 (const_rtx r
, int n
, int c1
, int c2
, const char *file
,
836 int line
, const char *func
)
839 ("RTL check: expected elt %d type '%c' or '%c', have '%c' (rtx %s) in %s, at %s:%d",
840 n
, c1
, c2
, GET_RTX_FORMAT (GET_CODE (r
))[n
], GET_RTX_NAME (GET_CODE (r
)),
841 func
, trim_filename (file
), line
);
845 rtl_check_failed_code1 (const_rtx r
, enum rtx_code code
, const char *file
,
846 int line
, const char *func
)
848 internal_error ("RTL check: expected code '%s', have '%s' in %s, at %s:%d",
849 GET_RTX_NAME (code
), GET_RTX_NAME (GET_CODE (r
)), func
,
850 trim_filename (file
), line
);
854 rtl_check_failed_code2 (const_rtx r
, enum rtx_code code1
, enum rtx_code code2
,
855 const char *file
, int line
, const char *func
)
858 ("RTL check: expected code '%s' or '%s', have '%s' in %s, at %s:%d",
859 GET_RTX_NAME (code1
), GET_RTX_NAME (code2
), GET_RTX_NAME (GET_CODE (r
)),
860 func
, trim_filename (file
), line
);
864 rtl_check_failed_code3 (const_rtx r
, enum rtx_code code1
, enum rtx_code code2
,
865 enum rtx_code code3
, const char *file
, int line
,
869 ("RTL check: expected code '%s', '%s' or '%s', have '%s' in %s, at %s:%d",
870 GET_RTX_NAME (code1
), GET_RTX_NAME (code2
), GET_RTX_NAME (code3
),
871 GET_RTX_NAME (GET_CODE (r
)), func
, trim_filename (file
), line
);
875 rtl_check_failed_code_mode (const_rtx r
, enum rtx_code code
, machine_mode mode
,
876 bool not_mode
, const char *file
, int line
,
879 internal_error ((not_mode
880 ? ("RTL check: expected code '%s' and not mode '%s', "
881 "have code '%s' and mode '%s' in %s, at %s:%d")
882 : ("RTL check: expected code '%s' and mode '%s', "
883 "have code '%s' and mode '%s' in %s, at %s:%d")),
884 GET_RTX_NAME (code
), GET_MODE_NAME (mode
),
885 GET_RTX_NAME (GET_CODE (r
)), GET_MODE_NAME (GET_MODE (r
)),
886 func
, trim_filename (file
), line
);
889 /* Report that line LINE of FILE tried to access the block symbol fields
890 of a non-block symbol. FUNC is the function that contains the line. */
893 rtl_check_failed_block_symbol (const char *file
, int line
, const char *func
)
896 ("RTL check: attempt to treat non-block symbol as a block symbol "
897 "in %s, at %s:%d", func
, trim_filename (file
), line
);
900 /* XXX Maybe print the vector? */
902 cwi_check_failed_bounds (const_rtx x
, int n
, const char *file
, int line
,
906 ("RTL check: access of hwi elt %d of vector with last elt %d in %s, at %s:%d",
907 n
, CWI_GET_NUM_ELEM (x
) - 1, func
, trim_filename (file
), line
);
910 /* XXX Maybe print the vector? */
912 rtvec_check_failed_bounds (const_rtvec r
, int n
, const char *file
, int line
,
916 ("RTL check: access of elt %d of vector with last elt %d in %s, at %s:%d",
917 n
, GET_NUM_ELEM (r
) - 1, func
, trim_filename (file
), line
);
919 #endif /* ENABLE_RTL_CHECKING */
921 #if defined ENABLE_RTL_FLAG_CHECKING
923 rtl_check_failed_flag (const char *name
, const_rtx r
, const char *file
,
924 int line
, const char *func
)
927 ("RTL flag check: %s used with unexpected rtx code '%s' in %s, at %s:%d",
928 name
, GET_RTX_NAME (GET_CODE (r
)), func
, trim_filename (file
), line
);
930 #endif /* ENABLE_RTL_FLAG_CHECKING */