Re: [SH] Fold big/little endian word code with MSW and LSW

2012-04-09 Thread Kaz Kojima
Oleg Endo wrote: >> On a second thought, it might be better to simplify those cases in >> the .md file, where low/high subregs are used by using 'gen_highpart' >> and 'gen_lowpart' for example, instead of checking the endianness over >> and over again. >> I'm trying out a couple of things... > >

Re: [SH] Fold big/little endian word code with MSW and LSW

2012-04-08 Thread Oleg Endo
On Fri, 2012-04-06 at 23:53 +0200, Oleg Endo wrote: > On Fri, 2012-04-06 at 10:46 +0900, Kaz Kojima wrote: > > From: Oleg Endo > > >> Exposing three-letter macro MSW and LSW globally looks not > > >> a good idea to me. > > > > > > Would 'HIGH_WORD' and 'LOW_WORD' be OK as an alternative? > > > >

Re: [SH] Fold big/little endian word code with MSW and LSW

2012-04-06 Thread Oleg Endo
On Fri, 2012-04-06 at 10:46 +0900, Kaz Kojima wrote: > From: Oleg Endo > >> Exposing three-letter macro MSW and LSW globally looks not > >> a good idea to me. > > > > Would 'HIGH_WORD' and 'LOW_WORD' be OK as an alternative? > > Sounds better but still a bit too generic. SH_{HIGH,LOW}_WORD > wo

Re: [SH] Fold big/little endian word code with MSW and LSW

2012-04-05 Thread Kaz Kojima
From: Oleg Endo >> Exposing three-letter macro MSW and LSW globally looks not >> a good idea to me. > > Would 'HIGH_WORD' and 'LOW_WORD' be OK as an alternative? Sounds better but still a bit too generic. SH_{HIGH,LOW}_WORD would be Ok, though not so cool. Regards, kaz

Re: [SH] Fold big/little endian word code with MSW and LSW

2012-04-05 Thread Oleg Endo
On Fri, 2012-04-06 at 07:38 +0900, Kaz Kojima wrote: > Oleg Endo wrote: > > The attached patch folds some of the code that needs to access high/low > > subwords depending on the target endianess by utilizing the existing MSW > > and LSW macros. > [snip] > > * config/sh/sh.c (MSW, LSW): Move ma

Re: [SH] Fold big/little endian word code with MSW and LSW

2012-04-05 Thread Kaz Kojima
Oleg Endo wrote: > The attached patch folds some of the code that needs to access high/low > subwords depending on the target endianess by utilizing the existing MSW > and LSW macros. [snip] > * config/sh/sh.c (MSW, LSW): Move macros to... > * config/sh/sh.h: ...here. > * config/

[SH] Fold big/little endian word code with MSW and LSW

2012-04-05 Thread Oleg Endo
Hi, The attached patch folds some of the code that needs to access high/low subwords depending on the target endianess by utilizing the existing MSW and LSW macros. Tested against rev 185893 with... make -k check RUNTESTFLAGS="--target_board=sh-sim \{-m2/-ml,-m2/-mb,-m2a-single/-mb, -m4-single/-m