This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v2] libgo: Add support for sh


On 01/10/2018 03:25 PM, Ian Lance Taylor wrote:
Thanks.  I finally took a look at this.  I don't know much about SH,
but I don't think we want to add each SH variant as a separate GOARCH
value.  As you can see from the list you modified in
ibgo/go/go/build/syslist.go, the difference between GOARCH values is
essentially the calling convention.  There are many different kinds of
x86 processors, but since the only calling convention difference is
between 32-bit and 64-bit, the list has only 386 and amd64.  Similarly
it seems to me we should have only sh and shbe in the list for SH
processors.

My reasoning is that gcc itself differentiates between those different
SH targets, i.e. there is a sh3, a sh4 target and the big-endian variants
of these targets. There aren't different x86_64 targets in gcc though.

Furthermore, as you can see, sh3 and sh4 also have different cacheline
sizes, for example:

https://go-review.googlesource.com/c/gofrontend/+/84555/1/libgo/configure.ac

In total, we have four different SH targets.

Adrian

--
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaubitz@debian.org
`. `'   Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]