diff options
author | Uros Bizjak <ubizjak@gmail.com> | 2015-07-25 13:34:59 +0200 |
---|---|---|
committer | Uros Bizjak <uros@gcc.gnu.org> | 2015-07-25 13:34:59 +0200 |
commit | 0453025d3fbe3223a98cc2b95b53048e44b1ad5b (patch) | |
tree | 9bd66778e67250b3ae5cde5aa8cbc9eb743a3bdd /gcc | |
parent | 8d2ccbd26694b22419d4c189743815f32dd88c67 (diff) | |
download | gcc-0453025d3fbe3223a98cc2b95b53048e44b1ad5b.zip gcc-0453025d3fbe3223a98cc2b95b53048e44b1ad5b.tar.gz gcc-0453025d3fbe3223a98cc2b95b53048e44b1ad5b.tar.bz2 |
re PR target/67004 (valgrind error in recog_memoized & shorten_branches)
PR target/67004
* config/i386/i386.h (ADJUST_INSN_LENGTH): Use NONDEBUG_INSN_P (INSN)
predicate and INSN_CODE (INSN) >= 0 to check for valid instruction.
From-SVN: r226215
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/config/i386/i386.h | 11 |
2 files changed, 12 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f91b006..b43e900 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2015-07-25 Uros Bizjak <ubizjak@gmail.com> + + PR target/67004 + * config/i386/i386.h (ADJUST_INSN_LENGTH): Use NONDEBUG_INSN_P (INSN) + predicate and INSN_CODE (INSN) >= 0 to check for valid instruction. + 2015-07-25 Sebastian Pop <s.pop@samsung.com> * Makefile.in: Remove use of TREEBROWSER. diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h index 72ec74d..7bd23ec 100644 --- a/gcc/config/i386/i386.h +++ b/gcc/config/i386/i386.h @@ -2262,11 +2262,12 @@ do { \ #define DEFAULT_LARGE_SECTION_THRESHOLD 65536 /* Adjust the length of the insn with the length of BND prefix. */ -#define ADJUST_INSN_LENGTH(INSN, LENGTH) \ -do { \ - if (recog_memoized (INSN) >= 0 \ - && get_attr_maybe_prefix_bnd (INSN)) \ - LENGTH += ix86_bnd_prefixed_insn_p (INSN); \ + +#define ADJUST_INSN_LENGTH(INSN, LENGTH) \ +do { \ + if (NONDEBUG_INSN_P (INSN) && INSN_CODE (INSN) >= 0 \ + && get_attr_maybe_prefix_bnd (INSN)) \ + LENGTH += ix86_bnd_prefixed_insn_p (INSN); \ } while (0) /* Which processor to tune code generation for. These must be in sync |