🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #400

Help on addressing modes...

#400
From: Michael Gersten
Date: Thu, 10 Sep 1992 01:38
20 lines
1215 bytes
I need some help on addressing modes in gcc 2.2.2.

I have a machine where some instructions can take a constant address,
or a constant plus a register. Some can handle the indirect versions
of those (contents of a fixed location, or contents of a fixed location
plus a register).

How do I tell the compiler that some instructions cannot indirect? I
can say that an operand must be memory, but it won't be able to be
any memory expression. (In other words, GO_IF_LEGITIMATE_ADDRESS needs
to depend on the instruction being generated).

Also, am I correct in thinking that if GO_IF_LEGITIMATE_ADDRESS is
passed an rtx beginning with '(mem (...) )', then it is an indirect
address? (I.e., if it is passed '(reg X)' it is not the register itself
that is being addressed, but the address pointed to by the register)

		Michael
michael@stb.info.com
Technical Details
Message-ID: <m0mSdUC-0005OXC@stb.info.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!stb.INfo.COM!michael

Show Full Headers
Complete Article Headers
Newsgroups: gnu.gcc.help
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!stb.INfo.COM!michael
From: michael@stb.INfo.COM (Michael Gersten)
Subject: Help on addressing modes...
Message-ID: <m0mSdUC-0005OXC@stb.info.com>
Sender: daemon@cis.ohio-state.edu
Organization: GNUs Not Usenet
Distribution: gnu
Date: Thu, 10 Sep 1992 01:38:00 GMT
Lines: 20