Article View: gnu.gcc.bug
Article #841How to force register-only data addressing? (370 port)
From: Bruce McKenney
Date: Mon, 04 Dec 1989 20:00
Date: Mon, 04 Dec 1989 20:00
36 lines
2320 bytes
2320 bytes
I believe I have a first approximation of a port of GCC to the IBM 370.
I think I'm beginning to get the hang of all this, but I'm still having
a few troubles, and I'd like to tap the net's wisdom on one specific
and one general question.
The specific question deals with data addressing. The 370's 12-bit
operand offset value is small enough to render it useless in addressing
arbitrary locations in the data segment(s); thus, any such reference
must (in general) be preceded by a load of some register with the
address of the datum, with the reference then going indirectly
through said register. The question, then, is: how to do this?
Conceptually, what I (think I) want to do is force any rtx of the form
(mem:XX (symbol_ref:XX ("YYYY"))) to go first through the standard
"load_address" insn pattern to load the address of YYYY into a register,
but I don't see any general way of doing this. I'd like to do this in a way
that gives the compiler enough information to schedule the use
of these address registers intelligently.
The LEGITIMATE_ADDRESS macros appear to be trying to deal with this, but
they also appear to be overkill for this purpose (e.g., they seem to affect
the "load_address" operands as well). Do I want a custom constraint
function (general_operand_address_in_register)? Am I just looking at this
the wrong way?
More generally, has anyone had occasion to write a "porting cheat sheet"
to go along with the Porting Guide, some sort of informal writeup with hints
on how to approach such problems? (E.g., was Mr. Tower's Usenix talk from
a few years back ever transcribed?) I don't mind solving things for myself,
but I'd like to stand on others' proverbial shoulders if possible.
Thanks in advance for any advice.
Bruce McKenney, ITS, RPI
mckenney@pawl.rpi.edu
mckenney@itsgw.rpi.edu
Bruce_McKenney@mts.rpi.edu
Technical Details
Message-ID:
<8912042000.AA12660@sub.pawl.rpi.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!pawl.rpi.edu!mckenneyShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!pawl.rpi.edu!mckenney From: mckenney@pawl.rpi.edu (Bruce McKenney) Newsgroups: gnu.gcc.bug Subject: How to force register-only data addressing? (370 port) Message-ID: <8912042000.AA12660@sub.pawl.rpi.edu> Date: 4 Dec 89 20:00:16 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 36