This is the mail archive of the
cgen@sources.redhat.com
mailing list for the CGEN project.
Re: [Bug] subword handling for DI modes
- To: "Frank Ch. Eigler" <fche at redhat dot com>
- Subject: Re: [Bug] subword handling for DI modes
- From: Ben Elliston <bje at cygnus dot com>
- Date: Thu, 26 Oct 2000 17:02:37 +1100 (EST)
- Cc: cgen at sources dot redhat dot com
While I don't have a fix for this problem, let me make the observation
that the interpretation of the subword number (the last argument) is
pretty iffy. Some cgen code interprets it an endian-dependent manner
(as in "0th subword as laid out in memory"), and some other code in
endian-independent (as in "0th among least->most significant
subwords").
I think the manual describes this predicament.
I think the endinan-independent interpretation is more useful, but to
switch over to it would require a fair bit of testing. Still, it's
important to fix this one way or the other.
I agree -- my preferred usage is for (subword <mode> 0) to give me bits 0 to
sizeof(mode) - 1. I hope it can be fixed soon.
Ben