This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH, i386]: Fix PR 64003, valgrind complains about get_attr_length_nobnd in insn-attrtab.c from i386.md


On Sat, Jul 25, 2015 at 1:17 AM, Tom de Vries <Tom_deVries@mentor.com> wrote:
> On 24/07/15 18:29, Uros Bizjak wrote:
>>
>> This patch introduces ADJUST_INSN_LENGTH define to i386.h to increase
>> the length of the insn when bnd prefix is used.

[...]

> Is it possible this causes a build breaker on x86_64 with
> --enable-checking=rtl?
>
> In file included from src/libgcc/unwind-dw2.c:35:0:
> src/libgcc/unwind-pe.h: In function âread_encoded_value_with_baseâ:
> src/libgcc/unwind-pe.h:271:1: internal compiler error: RTL check: expected
> elt 5 type 'i' or 'n', have '0' (rtx jump_table_data) in recog_memoized, at
> recog.h:167

Yes, it looks so. I really should use --enable-checking=rtl more.

I'm testing following patch:

Index: config/i386/i386.h
===================================================================
--- config/i386/i386.h  (revision 226207)
+++ config/i386/i386.h  (working copy)
@@ -2264,7 +2264,7 @@
/* Adjust the length of the insn with the length of BND prefix.  */
#define ADJUST_INSN_LENGTH(INSN, LENGTH)       \
do {                                           \
-  if (recog_memoized (INSN) >= 0               \
+  if (INSN_P (INSN) && INSN_CODE (INSN) >= 0   \
      && get_attr_maybe_prefix_bnd (INSN))     \
    LENGTH += ix86_bnd_prefixed_insn_p (INSN); \
} while (0)

Uros.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]