public inbox for cgen@sourceware.org
 help / color / mirror / Atom feed
* variable width instructions
@ 2002-12-20 14:59 David Carney
  2002-12-20 18:23 ` Frank Ch. Eigler
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: David Carney @ 2002-12-20 14:59 UTC (permalink / raw)
  To: cgen

I'm trying to write a .cpu file for a simple, non-pipelined (CISC) chip.  The 
instructions and data are all 16 bits (little endian).  Defining the 
instruction fields was relatively straight forward, until I realised that 
instructions involving 'immediate' datum are, in fact, 32 bits...

My question is: how I should go about defining the instruction fields for this 
architecture?  I.e. what value should I use for the "start" fields in 
"(define-ifield ...)" for the msb so that instruction fields are compatible 
for both 16-bit and (the effectively) 32-bit instructions (15 or 31) ?

My confusion stems from observing the line:

	(dnf f-i32       "32 bit immediate"      (SIGN-OPT) 16 32)

in fr30.cpu.  Doesn't the "16 32" denote that the start of the opcode is at 
bit 16, but the length is 32?  For my ISA I need something equivalent to 
"start" = -1, "length" = 16.  How do I go about this?

Dave Carney


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

end of thread, other threads:[~2003-02-07 21:06 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-12-20 14:59 variable width instructions David Carney
2002-12-20 18:23 ` Frank Ch. Eigler
2002-12-21 21:13 ` Doug Evans
2003-02-07 14:40 ` Again: " Manuel Kessler
2003-02-07 21:06   ` Jan Zizka

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).