Endianness and CGEN_INT_INSN_P
Richard Sandiford
rsandifo@cambridge.redhat.com
Tue Jan 2 09:21:00 GMT 2001
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
More information about the Cgen
mailing list