This is the mail archive of the cgen@sourceware.org mailing list for the CGEN project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

CGEN_DIS_HASH: how to get endianness and/or instruction size?


The ARCompact architecture has both 16 and 32 bit opcodes, and each can
take an optional 32 bit immediate.  Moreover, this is a bi-endian
architecture.
So, inside CGEN_DIS_HASH, how can I get the first 16 bits of the instruction,
represented in host byte order?
If I want to dereference the buffer pointer, I need to know the target
endianness.
If I want to use the passed instruction value, I need to know what size it
is.  Note that there are valid 32 bit opcodes which have all upper 16 bits
cleared.
It is also not quite clear if I can use this value if there is a 32 bit
immediate attached to the opcode.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]