-
Notifications
You must be signed in to change notification settings - Fork 15
arcv: simplify multilib configurations and cover more cases #147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
1. Remove Zicsr from all configurations. It's not necessary anymore since crt0 in Newlib and Picolibc is built with Zicsr extension explicitly. 2. Remove Zcmp from all configurations. It may reduce performance significantly but the gain in library size is minimal. 3. Remove Zcmt from all configurations. GCC does not produce Zcmt code by default. 4. Add more general configurations for testing. Signed-off-by: Yuriy Kolerov <[email protected]>
arcv_march_variants += rv32imac_zcb_zba_zbb_zbs_zfinx | ||
arcv_march_variants += rv32imac_zcb_zba_zbb_zbs_zfinx_zdinx | ||
arcv_march_variants += rv32i_zba_zbb_zbs | ||
arcv_march_variants += rv32im_zba_zbb_zbs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIRC, the most critical insns for strcmp() are or.b and rev8 which are both part of Zbb. Should we create a fallback without Zba and Zbs, but with Zbb?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think that it's reasonable now. There could be too many of such fallbacks with a single zbb
for all possible variants of march
.
Add rv32em and rv32ema configurations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you!
@abrodkin Could you please take a look at this new list? |
What I'd like to see in that PR description at least:
|
@abrodkin I updated PR's description. |
We have 4 -mtune values for ARC-V targets: 1. arc-v-rmx-100-series 2. arc-v-rmx-500-series 3. arc-v-rhx-100-series 4. arc-v-rpx-100-series When all of them are mentioned in a multilib configuration file (t-arcv for ARC-V) and arc-v-rmx-100-series is a default -mtune value (-with-tune= configuration option for GCC), then GCC cannot build with default target options (like gcc app.c -o app). To fix this we had to use -with-tune=rocket. However, with such approach we have to pass -mtune for a particular ARC-V target manually and not rely on RMX-100 as a default target. This patch removes -mtune from t-arcv for all RMX-100 targets and sets -with-tune=arc-v-rmx-100-series if it's not set explicitly (it corresponds to -with-tune=default). This allows using -mtune=arc-v-rmx-100-series as default without passing extra configuration options to GCC build scripts and fixes that bug with default target options. Signed-off-by: Yuriy Kolerov <[email protected]>
@artemiy-volkov @abrodkin I pushed another patch (d067383) that also allows using |
List of changes
Zicsr
from all configurations. It's not necessary anymore sincecrt0
in Newlib and Picolibc is built withZicsr
extension explicitly.Zcmp
from all configurations. It may reduce performance significantly but the gain in library size is minimal.Zcmt
from all configurations. GCC does not produceZcmt
code by default.Toolchain's size
When installed the toolchain occupies ~13GB. A compressed
tar.xz
archive (LZMA) occupies ~1.3GB with maximum compression rate.List of RMX-100 mini configurations
-mtune=arc-v-rmx-100-series
.-mcmodel=medlow
.march
mabi
rv32e
ilp32e
rv32em
ilp32e
rv32ea
ilp32e
rv32ema
ilp32e
rv32emac_zcb_zba_zbb_zbs_zfinx_zdinx
ilp32e
List of RMX-100 configurations
-mtune=arc-v-rmx-100-series
.-mcmodel=medlow
.zcb_zba_zbb_zbs
set. All optimized configurations include them. However, usingC
extensions may lead to performance decrease for RMX-100, thus additional optimized configurations withoutC
are shipped too.march
mabi
rv32i
ilp32
rv32ic
ilp32
rv32im
ilp32
rv32ia
ilp32
rv32ima
ilp32
rv32iac
ilp32
rv32imac
ilp32
rv32ic_zcb_zba_zbb_zbs
ilp32
rv32imc_zcb_zba_zbb_zbs
ilp32
rv32imac_zcb_zba_zbb_zbs
ilp32
rv32imac_zcb_zba_zbb_zbs_zfinx
ilp32
rv32imac_zcb_zba_zbb_zbs_zfinx_zdinx
ilp32
rv32i_zba_zbb_zbs
ilp32
C
rv32im_zba_zbb_zbs
ilp32
C
rv32ima_zba_zbb_zbs
ilp32
C
rv32ima_zba_zbb_zbs_zfinx
ilp32
C
with SP FPUrv32ima_zba_zbb_zbs_zfinx_zdinx
ilp32
C
with DP FPUList of RMX-500 configurations
-mtune=arc-v-rmx-500-series
.-mcmodel=medlow
.zcb_zba_zbb_zbs
set. All optimized configurations include them.march
mabi
rv32i
ilp32
rv32ic
ilp32
rv32im
ilp32
rv32ia
ilp32
rv32ima
ilp32
rv32iac
ilp32
rv32imac
ilp32
rv32ic_zcb_zba_zbb_zbs
ilp32
rv32imc_zcb_zba_zbb_zbs
ilp32
rv32imac_zcb_zba_zbb_zbs
ilp32
rv32imac_zcb_zba_zbb_zbs_zfinx
ilp32
rv32imac_zcb_zba_zbb_zbs_zfinx_zdinx
ilp32
List of RHX-100 configurations
-mtune=arc-v-rhx-100-series
.-mcmodel=medlow
.mac_zcb_zba_zbb_zbs
set. All optimized configurations include them.Zcd
and configurations withD
extension containZca
instead ofC
.march
mabi
rv32i
ilp32
rv32ic
ilp32
rv32im
ilp32
rv32ia
ilp32
rv32ima
ilp32
rv32iac
ilp32
rv32imac
ilp32
rv32imafc
ilp32f
rv32imafd_zca
ilp32d
rv32imac_zcb_zba_zbb_zbs
ilp32
rv32imafc_zcb_zba_zbb_zbs
ilp32f
rv32imafd_zca_zcb_zba_zbb_zbs
ilp32d
List of RPX-100 configurations
-mtune=arc-v-rhx-100-series
.-mcmodel=medany
.mac_zcb_zba_zbb_zbs
set. All optimized configurations include them.march
mabi
rv64i
lp64
rv64ic
lp64
rv64im
lp64
rv64imc
lp64
rv64ia
lp64
rv64ima
lp64
rv64iac
lp64
rv64imac
lp64
rv64imafdc
lp64d
rv64imac_zcb_zba_zbb_zbs
lp64
rv64imafdc_zcb_zba_zbb_zbs
lp64