This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, i386]: Fix PR 64003, valgrind complains about get_attr_length_nobnd in insn-attrtab.c from i386.md
- From: Uros Bizjak <ubizjak at gmail dot com>
- To: Tom de Vries <Tom_deVries at mentor dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Sat, 25 Jul 2015 09:32:43 +0200
- Subject: Re: [PATCH, i386]: Fix PR 64003, valgrind complains about get_attr_length_nobnd in insn-attrtab.c from i386.md
- Authentication-results: sourceware.org; auth=none
- References: <CAFULd4Y9dHA1_N7Hv=OfwP1HyiLQ5Bbj9sgEiVduJ+sZvwF0QQ at mail dot gmail dot com> <55B2C792 dot 2040104 at mentor dot com>
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.