public inbox for cgen@sourceware.org
 help / color / mirror / Atom feed
* opcode bits beyond base-insn-bitsize
@ 2002-12-23 21:51 Doug Evans
  2002-12-24  9:53 ` DJ Delorie
  0 siblings, 1 reply; 5+ messages in thread
From: Doug Evans @ 2002-12-23 21:51 UTC (permalink / raw)
  To: dj, geoffk; +Cc: cgen

I found this fixme in xstormy16.cpu.

(define-isa
  (name xstormy16)
  (comment "Xstormy16 instruction set")
  (default-insn-word-bitsize 32)
  (default-insn-bitsize 32)
  ; FIXME base-insn-bitsize should be 16 too, but at present CGEN has
  ; no support for instruction sets with opcode bits past
  ; base-insn-bitsize, so we must set it to at least 20.
  (base-insn-bitsize 32)
)

Can anyone remember what the details are?
i.e. what didn't work?  assembler? disassembler? simulator?

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: opcode bits beyond base-insn-bitsize
  2002-12-23 21:51 opcode bits beyond base-insn-bitsize Doug Evans
@ 2002-12-24  9:53 ` DJ Delorie
  2002-12-24 10:08   ` Doug Evans
  0 siblings, 1 reply; 5+ messages in thread
From: DJ Delorie @ 2002-12-24  9:53 UTC (permalink / raw)
  To: dje; +Cc: geoffk, cgen


> Can anyone remember what the details are?
> i.e. what didn't work?  assembler? disassembler? simulator?

xstormy16 has both 16bit and 32bit opcodes, and some of the 32bit
opcodes have decodable bits in the second half.  The base-insn-bitsize
is used to set up the masks and such, so it needs to be at least as
big as the largest decodable bits.

The tricky bit is when the 32-bit opcodes are mixed endian (i.e.  the
first 16 bits are swapped independently of the second 16 bits,
resulting in ABCD or BADC endian, but not DCBA).

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: opcode bits beyond base-insn-bitsize
  2002-12-24  9:53 ` DJ Delorie
@ 2002-12-24 10:08   ` Doug Evans
  2002-12-24 10:11     ` DJ Delorie
  0 siblings, 1 reply; 5+ messages in thread
From: Doug Evans @ 2002-12-24 10:08 UTC (permalink / raw)
  To: dj; +Cc: geoffk, cgen

   Date: Tue, 24 Dec 2002 12:52:59 -0500
   From: DJ Delorie <dj@redhat.com>

   > Can anyone remember what the details are?
   > i.e. what didn't work?  assembler? disassembler? simulator?

   xstormy16 has both 16bit and 32bit opcodes, and some of the 32bit
   opcodes have decodable bits in the second half.  The base-insn-bitsize
   is used to set up the masks and such, so it needs to be at least as
   big as the largest decodable bits.

s/needs/needed/
There is no intent that this is how things should work.

IIRC the simulator fetches and decodes additional bits as necessary.
In the case of opcodes support, there should be additional masks
as appropriate.

   The tricky bit is when the 32-bit opcodes are mixed endian (i.e.  the
   first 16 bits are swapped independently of the second 16 bits,
   resulting in ABCD or BADC endian, but not DCBA).

Yes, that adds extra trickyness, especially
if base-insn-bitsize is 32 and not 16.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: opcode bits beyond base-insn-bitsize
  2002-12-24 10:08   ` Doug Evans
@ 2002-12-24 10:11     ` DJ Delorie
  2002-12-24 10:27       ` Doug Evans
  0 siblings, 1 reply; 5+ messages in thread
From: DJ Delorie @ 2002-12-24 10:11 UTC (permalink / raw)
  To: dje; +Cc: geoffk, cgen


> There is no intent that this is how things should work.

If things have changed since the last mixed-size port I did, well,
then I can't tell you what it's supposed to do now.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: opcode bits beyond base-insn-bitsize
  2002-12-24 10:11     ` DJ Delorie
@ 2002-12-24 10:27       ` Doug Evans
  0 siblings, 0 replies; 5+ messages in thread
From: Doug Evans @ 2002-12-24 10:27 UTC (permalink / raw)
  To: dj; +Cc: geoffk, cgen

   Date: Tue, 24 Dec 2002 13:11:09 -0500
   From: DJ Delorie <dj@redhat.com>

   > There is no intent that this is how things should work.

   If things have changed since the last mixed-size port I did, well,
   then I can't tell you what it's supposed to do now.

No claim is made that all the necessary support is currently there.
We'll certainly add it as appropriate.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2002-12-24 18:27 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-12-23 21:51 opcode bits beyond base-insn-bitsize Doug Evans
2002-12-24  9:53 ` DJ Delorie
2002-12-24 10:08   ` Doug Evans
2002-12-24 10:11     ` DJ Delorie
2002-12-24 10:27       ` Doug Evans

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).