Path: utzoo!telly!ddsw1!mcdchg!rutgers!tut.cis.ohio-state.edu!DECWRL.DEC.COM!dan%jeremy.DEC From: dan%jeremy.DEC@DECWRL.DEC.COM (Dan Frommer) Newsgroups: gnu.gcc Subject: Targeting GCC to a 16-bit'er Message-ID: <8810051205.AA08155@decwrl.dec.com> Date: 5 Oct 88 18:04:00 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 37 Attached is the "Q" processor spec. I'm interested in hosting GCC under VAX/VMS, while targeting the code to the 16-bit Q. Is this feasable? Are there limitations on targeting GCC's output to a 16-bit machine? How hard is it to adapt the machine description files to a new target? Dan "Q" Processor Description ------------------------- The "Q" processor is a 16 bit micro-controller used as an on-chip control processor, which also has a 16-bit address space. It has 8 general purpose registers, a stack pointer, and several other control registers (The SP & PC are not part of the GPRs). A single addressing mode is available: Base Register + Offset. Small (5-bit) constants can be used as literals in arithmetic instructions, and a Load Immediate instruction can load a register with a single word constant. Memory can only be referenced using word (16-bit) addresses. Least significant bits have lower addresses. The instruction set includes various integer arithmetic & logical instructions. but no multiply/divide. No condition code is available, and test reg+branch is done using single instructions. A carry bit is available to enable multiple precision arithmetic. The stack is used for push/pop register instructions, and call/return. ======================================================================== Received: from prep.ai.mit.edu by decwrl.dec.com (5.54.5/4.7.34) id AA00883; Wed, 5 Oct 88 01:10:27 PDT Received: from decwrl.dec.com by prep.ai.mit.edu; Wed, 5 Oct 88 01:52:15 EST Received: by decwrl.dec.com (5.54.5/4.7.34) id AA29328; Wed, 5 Oct 88 00:30:56 PDT Message-Id: <8810050730.AA29328@decwrl.dec.com>