diff --git a/patches/gcc10.1/gcc-xtensa-fix-PR-target-98285.patch b/patches/gcc10.1/gcc-xtensa-0001-fix-PR-target-98285.patch similarity index 100% rename from patches/gcc10.1/gcc-xtensa-fix-PR-target-98285.patch rename to patches/gcc10.1/gcc-xtensa-0001-fix-PR-target-98285.patch diff --git a/patches/gcc10.1/gcc-xtensa-rearrange-DI-mode-constant-loading.patch b/patches/gcc10.1/gcc-xtensa-0002-rearrange-DI-mode-constant-loading.patch similarity index 100% rename from patches/gcc10.1/gcc-xtensa-rearrange-DI-mode-constant-loading.patch rename to patches/gcc10.1/gcc-xtensa-0002-rearrange-DI-mode-constant-loading.patch diff --git a/patches/gcc10.1/gcc-xtensa-add-optimizations-for-shift-operations.patch b/patches/gcc10.1/gcc-xtensa-0003-add-optimizations-for-shift-operations.patch similarity index 100% rename from patches/gcc10.1/gcc-xtensa-add-optimizations-for-shift-operations.patch rename to patches/gcc10.1/gcc-xtensa-0003-add-optimizations-for-shift-operations.patch diff --git a/patches/gcc10.1/gcc-xtensa-implement-bswapsi2-bswapdi2-and-helpers.patch b/patches/gcc10.1/gcc-xtensa-0004-implement-bswapsi2-bswapdi2-and-helpers.patch similarity index 100% rename from patches/gcc10.1/gcc-xtensa-implement-bswapsi2-bswapdi2-and-helpers.patch rename to patches/gcc10.1/gcc-xtensa-0004-implement-bswapsi2-bswapdi2-and-helpers.patch diff --git a/patches/gcc10.1/gcc-xtensa-0005-fix-PR-target-102115.patch b/patches/gcc10.1/gcc-xtensa-0005-fix-PR-target-102115.patch new file mode 100644 index 0000000..3cda431 --- /dev/null +++ b/patches/gcc10.1/gcc-xtensa-0005-fix-PR-target-102115.patch @@ -0,0 +1,29 @@ +From b552c4e601c7fdc4d341e29cc1ed6081d42b00d0 Mon Sep 17 00:00:00 2001 +From: Max Filippov +Date: Tue, 7 Sep 2021 15:40:00 -0700 +Subject: [PATCH] gcc: xtensa: fix PR target/102115 + +2021-09-07 Takayuki 'January June' Suwa +gcc/ + PR target/102115 + * config/xtensa/xtensa.c (xtensa_emit_move_sequence): Add + 'CONST_INT_P (src)' to the condition of the block that tries to + eliminate literal when loading integer contant. +--- + gcc/config/xtensa/xtensa.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/gcc/config/xtensa/xtensa.c b/gcc/config/xtensa/xtensa.c +index f4f8f1975c55a..8d6755144c120 100644 +--- a/gcc/config/xtensa/xtensa.c ++++ b/gcc/config/xtensa/xtensa.c +@@ -1084,7 +1084,8 @@ xtensa_emit_move_sequence (rtx *operands, machine_mode mode) + { + /* Try to emit MOVI + SLLI sequence, that is smaller + than L32R + literal. */ +- if (optimize_size && mode == SImode && register_operand (dst, mode)) ++ if (optimize_size && mode == SImode && CONST_INT_P (src) ++ && register_operand (dst, mode)) + { + HOST_WIDE_INT srcval = INTVAL (src); + int shift = ctz_hwi (srcval); diff --git a/patches/gcc10.2/gcc-xtensa-fix-PR-target-98285.patch b/patches/gcc10.2/gcc-xtensa-0001-fix-PR-target-98285.patch similarity index 100% rename from patches/gcc10.2/gcc-xtensa-fix-PR-target-98285.patch rename to patches/gcc10.2/gcc-xtensa-0001-fix-PR-target-98285.patch diff --git a/patches/gcc10.2/gcc-xtensa-rearrange-DI-mode-constant-loading.patch b/patches/gcc10.2/gcc-xtensa-0002-rearrange-DI-mode-constant-loading.patch similarity index 100% rename from patches/gcc10.2/gcc-xtensa-rearrange-DI-mode-constant-loading.patch rename to patches/gcc10.2/gcc-xtensa-0002-rearrange-DI-mode-constant-loading.patch diff --git a/patches/gcc10.2/gcc-xtensa-add-optimizations-for-shift-operations.patch b/patches/gcc10.2/gcc-xtensa-0003-add-optimizations-for-shift-operations.patch similarity index 100% rename from patches/gcc10.2/gcc-xtensa-add-optimizations-for-shift-operations.patch rename to patches/gcc10.2/gcc-xtensa-0003-add-optimizations-for-shift-operations.patch diff --git a/patches/gcc10.2/gcc-xtensa-implement-bswapsi2-bswapdi2-and-helpers.patch b/patches/gcc10.2/gcc-xtensa-0004-implement-bswapsi2-bswapdi2-and-helpers.patch similarity index 100% rename from patches/gcc10.2/gcc-xtensa-implement-bswapsi2-bswapdi2-and-helpers.patch rename to patches/gcc10.2/gcc-xtensa-0004-implement-bswapsi2-bswapdi2-and-helpers.patch diff --git a/patches/gcc10.2/gcc-xtensa-0005-fix-PR-target-102115.patch b/patches/gcc10.2/gcc-xtensa-0005-fix-PR-target-102115.patch new file mode 100644 index 0000000..3cda431 --- /dev/null +++ b/patches/gcc10.2/gcc-xtensa-0005-fix-PR-target-102115.patch @@ -0,0 +1,29 @@ +From b552c4e601c7fdc4d341e29cc1ed6081d42b00d0 Mon Sep 17 00:00:00 2001 +From: Max Filippov +Date: Tue, 7 Sep 2021 15:40:00 -0700 +Subject: [PATCH] gcc: xtensa: fix PR target/102115 + +2021-09-07 Takayuki 'January June' Suwa +gcc/ + PR target/102115 + * config/xtensa/xtensa.c (xtensa_emit_move_sequence): Add + 'CONST_INT_P (src)' to the condition of the block that tries to + eliminate literal when loading integer contant. +--- + gcc/config/xtensa/xtensa.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/gcc/config/xtensa/xtensa.c b/gcc/config/xtensa/xtensa.c +index f4f8f1975c55a..8d6755144c120 100644 +--- a/gcc/config/xtensa/xtensa.c ++++ b/gcc/config/xtensa/xtensa.c +@@ -1084,7 +1084,8 @@ xtensa_emit_move_sequence (rtx *operands, machine_mode mode) + { + /* Try to emit MOVI + SLLI sequence, that is smaller + than L32R + literal. */ +- if (optimize_size && mode == SImode && register_operand (dst, mode)) ++ if (optimize_size && mode == SImode && CONST_INT_P (src) ++ && register_operand (dst, mode)) + { + HOST_WIDE_INT srcval = INTVAL (src); + int shift = ctz_hwi (srcval); diff --git a/patches/gcc10.3/gcc-xtensa-fix-PR-target-98285.patch b/patches/gcc10.3/gcc-xtensa-0001-fix-PR-target-98285.patch similarity index 100% rename from patches/gcc10.3/gcc-xtensa-fix-PR-target-98285.patch rename to patches/gcc10.3/gcc-xtensa-0001-fix-PR-target-98285.patch diff --git a/patches/gcc10.3/gcc-xtensa-rearrange-DI-mode-constant-loading.patch b/patches/gcc10.3/gcc-xtensa-0002-rearrange-DI-mode-constant-loading.patch similarity index 100% rename from patches/gcc10.3/gcc-xtensa-rearrange-DI-mode-constant-loading.patch rename to patches/gcc10.3/gcc-xtensa-0002-rearrange-DI-mode-constant-loading.patch diff --git a/patches/gcc10.3/gcc-xtensa-add-optimizations-for-shift-operations.patch b/patches/gcc10.3/gcc-xtensa-0003-add-optimizations-for-shift-operations.patch similarity index 100% rename from patches/gcc10.3/gcc-xtensa-add-optimizations-for-shift-operations.patch rename to patches/gcc10.3/gcc-xtensa-0003-add-optimizations-for-shift-operations.patch diff --git a/patches/gcc10.3/gcc-xtensa-implement-bswapsi2-bswapdi2-and-helpers.patch b/patches/gcc10.3/gcc-xtensa-0004-implement-bswapsi2-bswapdi2-and-helpers.patch similarity index 100% rename from patches/gcc10.3/gcc-xtensa-implement-bswapsi2-bswapdi2-and-helpers.patch rename to patches/gcc10.3/gcc-xtensa-0004-implement-bswapsi2-bswapdi2-and-helpers.patch diff --git a/patches/gcc10.3/gcc-xtensa-0005-fix-PR-target-102115.patch b/patches/gcc10.3/gcc-xtensa-0005-fix-PR-target-102115.patch new file mode 100644 index 0000000..3cda431 --- /dev/null +++ b/patches/gcc10.3/gcc-xtensa-0005-fix-PR-target-102115.patch @@ -0,0 +1,29 @@ +From b552c4e601c7fdc4d341e29cc1ed6081d42b00d0 Mon Sep 17 00:00:00 2001 +From: Max Filippov +Date: Tue, 7 Sep 2021 15:40:00 -0700 +Subject: [PATCH] gcc: xtensa: fix PR target/102115 + +2021-09-07 Takayuki 'January June' Suwa +gcc/ + PR target/102115 + * config/xtensa/xtensa.c (xtensa_emit_move_sequence): Add + 'CONST_INT_P (src)' to the condition of the block that tries to + eliminate literal when loading integer contant. +--- + gcc/config/xtensa/xtensa.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/gcc/config/xtensa/xtensa.c b/gcc/config/xtensa/xtensa.c +index f4f8f1975c55a..8d6755144c120 100644 +--- a/gcc/config/xtensa/xtensa.c ++++ b/gcc/config/xtensa/xtensa.c +@@ -1084,7 +1084,8 @@ xtensa_emit_move_sequence (rtx *operands, machine_mode mode) + { + /* Try to emit MOVI + SLLI sequence, that is smaller + than L32R + literal. */ +- if (optimize_size && mode == SImode && register_operand (dst, mode)) ++ if (optimize_size && mode == SImode && CONST_INT_P (src) ++ && register_operand (dst, mode)) + { + HOST_WIDE_INT srcval = INTVAL (src); + int shift = ctz_hwi (srcval); diff --git a/patches/gcc11.1/gcc-xtensa-fix-PR-target-98285.patch b/patches/gcc11.1/gcc-xtensa-0001-fix-PR-target-98285.patch similarity index 100% rename from patches/gcc11.1/gcc-xtensa-fix-PR-target-98285.patch rename to patches/gcc11.1/gcc-xtensa-0001-fix-PR-target-98285.patch diff --git a/patches/gcc11.1/gcc-xtensa-rearrange-DI-mode-constant-loading.patch b/patches/gcc11.1/gcc-xtensa-0002-rearrange-DI-mode-constant-loading.patch similarity index 100% rename from patches/gcc11.1/gcc-xtensa-rearrange-DI-mode-constant-loading.patch rename to patches/gcc11.1/gcc-xtensa-0002-rearrange-DI-mode-constant-loading.patch diff --git a/patches/gcc11.1/gcc-xtensa-add-optimizations-for-shift-operations.patch b/patches/gcc11.1/gcc-xtensa-0003-add-optimizations-for-shift-operations.patch similarity index 100% rename from patches/gcc11.1/gcc-xtensa-add-optimizations-for-shift-operations.patch rename to patches/gcc11.1/gcc-xtensa-0003-add-optimizations-for-shift-operations.patch diff --git a/patches/gcc11.1/gcc-xtensa-implement-bswapsi2-bswapdi2-and-helpers.patch b/patches/gcc11.1/gcc-xtensa-0004-implement-bswapsi2-bswapdi2-and-helpers.patch similarity index 100% rename from patches/gcc11.1/gcc-xtensa-implement-bswapsi2-bswapdi2-and-helpers.patch rename to patches/gcc11.1/gcc-xtensa-0004-implement-bswapsi2-bswapdi2-and-helpers.patch diff --git a/patches/gcc11.1/gcc-xtensa-0005-fix-PR-target-102115.patch b/patches/gcc11.1/gcc-xtensa-0005-fix-PR-target-102115.patch new file mode 100644 index 0000000..3cda431 --- /dev/null +++ b/patches/gcc11.1/gcc-xtensa-0005-fix-PR-target-102115.patch @@ -0,0 +1,29 @@ +From b552c4e601c7fdc4d341e29cc1ed6081d42b00d0 Mon Sep 17 00:00:00 2001 +From: Max Filippov +Date: Tue, 7 Sep 2021 15:40:00 -0700 +Subject: [PATCH] gcc: xtensa: fix PR target/102115 + +2021-09-07 Takayuki 'January June' Suwa +gcc/ + PR target/102115 + * config/xtensa/xtensa.c (xtensa_emit_move_sequence): Add + 'CONST_INT_P (src)' to the condition of the block that tries to + eliminate literal when loading integer contant. +--- + gcc/config/xtensa/xtensa.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/gcc/config/xtensa/xtensa.c b/gcc/config/xtensa/xtensa.c +index f4f8f1975c55a..8d6755144c120 100644 +--- a/gcc/config/xtensa/xtensa.c ++++ b/gcc/config/xtensa/xtensa.c +@@ -1084,7 +1084,8 @@ xtensa_emit_move_sequence (rtx *operands, machine_mode mode) + { + /* Try to emit MOVI + SLLI sequence, that is smaller + than L32R + literal. */ +- if (optimize_size && mode == SImode && register_operand (dst, mode)) ++ if (optimize_size && mode == SImode && CONST_INT_P (src) ++ && register_operand (dst, mode)) + { + HOST_WIDE_INT srcval = INTVAL (src); + int shift = ctz_hwi (srcval);