Subject: Re: CVS commit: src/sys/arch/sgimips
To: None <port-mips@netbsd.org>
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
List: port-mips
Date: 10/09/2003 03:37:17
In article <000701c38dca$2241be70$0a00a8c0@PAQ2>
locore32@gaea.ocn.ne.jp wrote:

> > > It can be written in endian-neutral way by declaring a 32bit quantity of
> > > unsigned long and do explicit bitmasking and shifting.  The solution
> > > is cheap and elegant, removing endian puzzles forever.
> > 
> > Generated code will be less efficient thou.
> 
> As far as MIPS instruction set concern, good compilers will produce
> straight LOAD/STORE insn sequence even if you see &0xFF... and
> << >> on programs.   Alpha does more fancy play there.

And endian-independent implementation causes less bugs.
(As using bit-fields would be efficient on some ports,
 but it also might cause the endianness problem.)
---
Izumi Tsutsui
tsutsui@ceres.dti.ne.jp