This is the mail archive of the
cgen@sources.redhat.com
mailing list for the CGEN project.
Re: Endianness and CGEN_INT_INSN_P
- To: Dave Brolley <brolley at redhat dot com>
- Subject: Re: Endianness and CGEN_INT_INSN_P
- From: Richard Sandiford <rsandifo at cambridge dot redhat dot com>
- Date: Tue, 2 Jan 2001 17:21:43 +0000 (GMT)
- Cc: cgen at sources dot redhat dot com
On Tue, 2 Jan 2001, Dave Brolley wrote:
> From what I understand, CGEN_INT_INSN_P will not be true if there is at
> least one insn which will not fit into the word.
Do you mean host or target word? As it stands, the macro gets set to 1
whenever the longest instruction is 32 bits or less, i.e. whenever it can
fit into an int. But the code that handles instructions as integers
seems to assume that every instruction can fit into one *target* word.
It builds the instruction as an int without considering endianness, then
it stores that integer in either big or little endian form, depending
on the target. But, in a 16-bit arch, the two-word insn "AABB
CCDD" gets stored as "BB AA DD CC" when the macro is false and "DD CC BB
AA" when it is true.
Richard