[v4] RISC-V: Promote Zaamo/Zalrsc to a when using an old binutils
Checks
Context |
Check |
Description |
rivoscibot/toolchain-ci-rivos-lint |
success
|
Lint passed
|
rivoscibot/toolchain-ci-rivos-apply-patch |
success
|
Patch applied
|
rivoscibot/toolchain-ci-rivos-build--newlib-rv64gcv-lp64d-multilib |
success
|
Build passed
|
rivoscibot/toolchain-ci-rivos-build--linux-rv64gcv-lp64d-multilib |
success
|
Build passed
|
linaro-tcwg-bot/tcwg_gcc_build--master-aarch64 |
success
|
Build passed
|
rivoscibot/toolchain-ci-rivos-build--newlib-rv32imc_zba_zbb_zbc_zbs-ilp32d-non-multilib |
success
|
Build passed
|
rivoscibot/toolchain-ci-rivos-build--newlib-rv64gc-lp64d-multilib |
success
|
Build passed
|
rivoscibot/toolchain-ci-rivos-build--linux-rv64gc_zba_zbb_zbc_zbs-lp64d-non-multilib |
success
|
Build passed
|
rivoscibot/toolchain-ci-rivos-build--linux-rv32gc_zba_zbb_zbc_zbs-ilp32d-non-multilib |
success
|
Build passed
|
rivoscibot/toolchain-ci-rivos-test |
success
|
Testing passed
|
linaro-tcwg-bot/tcwg_gcc_check--master-aarch64 |
success
|
Test passed
|
linaro-tcwg-bot/tcwg_gcc_build--master-arm |
success
|
Build passed
|
linaro-tcwg-bot/tcwg_gcc_check--master-arm |
success
|
Test passed
|
Commit Message
Binutils 2.42 and before don't support Zaamo/Zalrsc. When users specify
both Zaamo and Zalrsc, promote them to 'a' in the -march string.
This does not affect testsuite results for users with old versions of binutils.
Testcases that failed due to 'call'/isa string continue to fail after this PATCH
when using an old version of binutils.
gcc/ChangeLog:
* common/config/riscv/riscv-common.cc: Add 'a' extension to
riscv_combine_info.
Signed-off-by: Patrick O'Neill <patrick@rivosinc.com>
---
We will emit calls if the user only specifies Zaamo or Zalrsc.
To my knowledge there isn't a way to make a testcase for this in dejagnu.
I used the most recent version of the 'a' extension arbitrarily since AFAICT the
version of the extension doesn't affect the combine logic.
---
gcc/common/config/riscv/riscv-common.cc | 1 +
1 file changed, 1 insertion(+)
--
2.34.1
Comments
LGTM :)
Patrick O'Neill <patrick@rivosinc.com> 於 2024年6月19日 週三 05:40 寫道:
> Binutils 2.42 and before don't support Zaamo/Zalrsc. When users specify
> both Zaamo and Zalrsc, promote them to 'a' in the -march string.
>
> This does not affect testsuite results for users with old versions of
> binutils.
> Testcases that failed due to 'call'/isa string continue to fail after this
> PATCH
> when using an old version of binutils.
>
> gcc/ChangeLog:
>
> * common/config/riscv/riscv-common.cc: Add 'a' extension to
> riscv_combine_info.
>
> Signed-off-by: Patrick O'Neill <patrick@rivosinc.com>
> ---
> We will emit calls if the user only specifies Zaamo or Zalrsc.
> To my knowledge there isn't a way to make a testcase for this in dejagnu.
> I used the most recent version of the 'a' extension arbitrarily since
> AFAICT the
> version of the extension doesn't affect the combine logic.
> ---
> gcc/common/config/riscv/riscv-common.cc | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/gcc/common/config/riscv/riscv-common.cc
> b/gcc/common/config/riscv/riscv-common.cc
> index 1dc1d9904c7..410e673f5e0 100644
> --- a/gcc/common/config/riscv/riscv-common.cc
> +++ b/gcc/common/config/riscv/riscv-common.cc
> @@ -401,6 +401,7 @@ static const struct riscv_ext_version
> riscv_ext_version_table[] =
> /* Combine extensions defined in this table */
> static const struct riscv_ext_version riscv_combine_info[] =
> {
> + {"a", ISA_SPEC_CLASS_20191213, 2, 1},
> {"zk", ISA_SPEC_CLASS_NONE, 1, 0},
> {"zkn", ISA_SPEC_CLASS_NONE, 1, 0},
> {"zks", ISA_SPEC_CLASS_NONE, 1, 0},
> --
> 2.34.1
>
>
Committed.
Patrick
On 6/19/24 06:25, Kito Cheng wrote:
> LGTM :)
>
> Patrick O'Neill <patrick@rivosinc.com> 於 2024年6月19日 週三 05:40 寫道:
>
> Binutils 2.42 and before don't support Zaamo/Zalrsc. When users
> specify
> both Zaamo and Zalrsc, promote them to 'a' in the -march string.
>
> This does not affect testsuite results for users with old versions
> of binutils.
> Testcases that failed due to 'call'/isa string continue to fail
> after this PATCH
> when using an old version of binutils.
>
> gcc/ChangeLog:
>
> * common/config/riscv/riscv-common.cc: Add 'a' extension to
> riscv_combine_info.
>
> Signed-off-by: Patrick O'Neill <patrick@rivosinc.com>
> ---
> We will emit calls if the user only specifies Zaamo or Zalrsc.
> To my knowledge there isn't a way to make a testcase for this in
> dejagnu.
> I used the most recent version of the 'a' extension arbitrarily
> since AFAICT the
> version of the extension doesn't affect the combine logic.
> ---
> gcc/common/config/riscv/riscv-common.cc | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/gcc/common/config/riscv/riscv-common.cc
> b/gcc/common/config/riscv/riscv-common.cc
> index 1dc1d9904c7..410e673f5e0 100644
> --- a/gcc/common/config/riscv/riscv-common.cc
> +++ b/gcc/common/config/riscv/riscv-common.cc
> @@ -401,6 +401,7 @@ static const struct riscv_ext_version
> riscv_ext_version_table[] =
> /* Combine extensions defined in this table */
> static const struct riscv_ext_version riscv_combine_info[] =
> {
> + {"a", ISA_SPEC_CLASS_20191213, 2, 1},
> {"zk", ISA_SPEC_CLASS_NONE, 1, 0},
> {"zkn", ISA_SPEC_CLASS_NONE, 1, 0},
> {"zks", ISA_SPEC_CLASS_NONE, 1, 0},
> --
> 2.34.1
>
@@ -401,6 +401,7 @@ static const struct riscv_ext_version riscv_ext_version_table[] =
/* Combine extensions defined in this table */
static const struct riscv_ext_version riscv_combine_info[] =
{
+ {"a", ISA_SPEC_CLASS_20191213, 2, 1},
{"zk", ISA_SPEC_CLASS_NONE, 1, 0},
{"zkn", ISA_SPEC_CLASS_NONE, 1, 0},
{"zks", ISA_SPEC_CLASS_NONE, 1, 0},