Path: utzoo!telly!ddsw1!lll-winken!uunet!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: <8810050730.AA29328@decwrl.dec.com> Date: 5 Oct 88 13:30:00 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 27 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.