diff options
Diffstat (limited to 'packages/gcc/gcc-4.2.2/901-avr32-fix-no-cond-exec-before-reload.patch')
-rw-r--r-- | packages/gcc/gcc-4.2.2/901-avr32-fix-no-cond-exec-before-reload.patch | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/packages/gcc/gcc-4.2.2/901-avr32-fix-no-cond-exec-before-reload.patch b/packages/gcc/gcc-4.2.2/901-avr32-fix-no-cond-exec-before-reload.patch new file mode 100644 index 0000000000..5d84dd82a8 --- /dev/null +++ b/packages/gcc/gcc-4.2.2/901-avr32-fix-no-cond-exec-before-reload.patch @@ -0,0 +1,48 @@ +Index: trunk/gcc/config/avr32/avr32.c +=================================================================== +--- trunk/gcc/config/avr32/avr32.c (revision 42108) ++++ trunk/gcc/config/avr32/avr32.c (revision 42335) +@@ -3737,7 +3737,34 @@ + return 0; + } + ++/* Return TRUE if X contains a MEM expression. */ ++int ++mem_mentioned_p (rtx x) ++{ ++ const char *fmt; ++ int i; + ++ if (MEM_P (x)) ++ return 1; ++ ++ fmt = GET_RTX_FORMAT (GET_CODE (x)); ++ for (i = GET_RTX_LENGTH (GET_CODE (x)) - 1; i >= 0; i--) ++ { ++ if (fmt[i] == 'E') ++ { ++ int j; ++ ++ for (j = XVECLEN (x, i) - 1; j >= 0; j--) ++ if (mem_mentioned_p (XVECEXP (x, i, j))) ++ return 1; ++ } ++ else if (fmt[i] == 'e' && mem_mentioned_p (XEXP (x, i))) ++ return 1; ++ } ++ ++ return 0; ++} ++ + int + avr32_legitimate_pic_operand_p (rtx x) + { +@@ -7547,7 +7574,7 @@ + /* We cannot move memory loads outside of the if-then-else + since the memory access should not be perfomed if the + condition is not met. */ +- && !MEM_P (SET_SRC (op)) ) ++ && !mem_mentioned_p (SET_SRC (op)) ) + { + rtx scratch_reg = gen_reg_rtx (mode); + rtx op_pattern = copy_rtx (op); |