Open luismgsilva opened 1 year ago
@luismgsilva good catch, in fact we should have fixed that discrepancy a long ago at the time we made a switch in GCC from arc700
to a fully-packed hs38_linux
, see https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=46d04271a4983b5430ed4830ab65ea26052176fb (https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/issues/348, https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=989453).
Moreover, I made that fix in Debian Binutils to fix exactly that discrepancy, see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=994190. But I guess it's better late than never ;)
I suggest moving that issue in the https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain as default tools settings have nothing to do with the way you build them.
@claziss care to copy it to arc-2023.09
branch as well?
During the analysis of assembly test comparisons, several interesting observations have been made. It was previously assumed that the default CPU for ARCv2 (
--target=arc
) wasARCHS
; however, this assumption turned out to be incorrect.Presently, the default CPU for ARCv2 is
hs38_linux
CPU. This can be verified in the following GCC file:gcc/gcc/config/arc/arc.h
.Although the default CPU being used is clearly
hs38_linux
, the information about the architecture in the generated ELF file indicates otherwise:According to the information provided by Binutils, the CPU mentioned is
archs
, which does not align with the actual default CPU. This discrepancy seems to be a mismatch in the information generated by Binutils.Furthermore, there are additional discrepancies in the configuration itself. One notable difference is the behavior of the toolchain build when no CPU is specified. In this case, the FPUD (Floating-Point Unit) is enabled by default. Additionally, the
Tag_ARC_ISA_mpy_option
attribute is set to 9, whereas it is set to 6 when--with-cpu=archs
is provided.Please refer to the following comparisons for better understanding: