On Sat, Jul 25, 2015 at 1:17 AM, Tom de Vries <tom_devr...@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.

Reply via email to