🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #54258

Machine Definition

#54258
From: Brad Pickering
Date: Wed, 02 Jan 1991 17:40
26 lines
1583 bytes
I am trying to get gcc to compile for an imaginary machine.  The machine
is very simple and does not have many of the instructions that gcc expects.
I can't find examples of some of the things I want to do and the manuals
aren't enough for me to understand how to do these things either.  Is there
anybody out there who could help me out?

Here is an example of what I am having difficulty with.  The machine has
no "call" instruction so I would like this to expand into: put the address
of the instruction following the call onto the stack, jump to the address
called.  I suspect the define_expand should look something like:
(define_expand "call"
  [(set (reg:SI 31) (plus:SI (const_int -4) (reg:SI 31)))
   (set (mem:SI (reg:SI 31)) (label_ref ???))
   (set (pc) (match_operand 0 "memory_operand" "m"))
   (code_label ???)]
  ""
  "")

I would really appreciate any help. Thanks
  Brad Pickering
  brad@gobi.jpl.nasa.gov
--
--
Brad Pickering
brad@gobi.jpl.nasa.gov
--
Technical Details
Message-ID: <BRAD.91Jan2114050@gobi.jpl.nasa.gov>
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!samsung!uakari.primate.wisc.edu!sdd.hp.com!elroy.jpl.nasa.gov!thyme!thyme!brad

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,fa639add65d0a091,start
X-Google-Attributes: gid11318c,public
X-Google-ArrivalTime: 1991-01-02 12:55:21 PST
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!samsung!uakari.primate.wisc.edu!sdd.hp.com!elroy.jpl.nasa.gov!thyme!thyme!brad
From: brad@gobi.jpl.nasa.gov (Brad Pickering)
Newsgroups: gnu.gcc.help
Subject: Machine Definition
Message-ID: <BRAD.91Jan2114050@gobi.jpl.nasa.gov>
Date: 2 Jan 91 17:40:50 GMT
Sender: news@thyme.jpl.nasa.gov
Distribution: gnu
Organization: Jet Propulsion Laboratory, Pasadena, CA
Lines: 26