Module Name: src
Committed By: rin
Date: Sat Oct 7 11:57:27 UTC 2023
Modified Files:
src/external/gpl3/gcc.old/dist/gcc/config/vax: vax.c vax.md
Log Message:
gcc.old: vax: PR port-vax/57646 patch provided by Kalvis Duckmanton [2/21]
Add a special case to the zero_extract instruction to handle the case
where 32 bits are requested (i.e. the entire word). When printing a mask
operand, avoid generating values that might overflow a 32 bit word.
To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 \
src/external/gpl3/gcc.old/dist/gcc/config/vax/vax.c
cvs rdiff -u -r1.12 -r1.13 \
src/external/gpl3/gcc.old/dist/gcc/config/vax/vax.md
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/external/gpl3/gcc.old/dist/gcc/config/vax/vax.c
diff -u src/external/gpl3/gcc.old/dist/gcc/config/vax/vax.c:1.13 src/external/gpl3/gcc.old/dist/gcc/config/vax/vax.c:1.14
--- src/external/gpl3/gcc.old/dist/gcc/config/vax/vax.c:1.13 Sat Oct 7 11:57:01 2023
+++ src/external/gpl3/gcc.old/dist/gcc/config/vax/vax.c Sat Oct 7 11:57:27 2023
@@ -587,7 +587,7 @@ print_operand (FILE *file, rtx x, int co
else if (code == 'b' && CONST_INT_P (x))
fprintf (file, "$%d", (int) (0xff & - INTVAL (x)));
else if (code == 'M' && CONST_INT_P (x))
- fprintf (file, "$%d", ~((1 << INTVAL (x)) - 1));
+ fprintf (file, "$%d", ((~0) << (INTVAL (x))));
else if (code == 'x' && CONST_INT_P (x))
fprintf (file, HOST_WIDE_INT_PRINT_HEX, INTVAL (x));
else if (REG_P (x))
Index: src/external/gpl3/gcc.old/dist/gcc/config/vax/vax.md
diff -u src/external/gpl3/gcc.old/dist/gcc/config/vax/vax.md:1.12 src/external/gpl3/gcc.old/dist/gcc/config/vax/vax.md:1.13
--- src/external/gpl3/gcc.old/dist/gcc/config/vax/vax.md:1.12 Sat Oct 7 11:57:01 2023
+++ src/external/gpl3/gcc.old/dist/gcc/config/vax/vax.md Sat Oct 7 11:57:27 2023
@@ -943,7 +943,14 @@
if (INTVAL (operands[3]) & 31)
return \"rotl %R3,%1,%0\;bicl2 %M2,%0\";
if (rtx_equal_p (operands[0], operands[1]))
- return \"bicl2 %M2,%0\";
+ {
+ if (INTVAL (operands[2]) == 32)
+ return \"\"; /* no-op */
+ else
+ return \"bicl2 %M2,%0\";
+ }
+ if (INTVAL (operands[2]) == 32)
+ return \"movl %1,%0\";
return \"bicl3 %M2,%1,%0\";
}")