comp.lang.ada
 help / color / mirror / Atom feed
From: NCOHEN@IBM.COM ("Norman H. Cohen")
Subject: Memory-mapped I/O
Date: 18 Jan 90 14:19:37 GMT	[thread overview]
Message-ID: <9001181438.AA16438@ajpo.sei.cmu.edu> (raw)

I agree with Harold Rabbie:  The best way to do memory-mapped I/O is
through LOW_LEVEL_IO.  If your compiler does not have an appropriate
SEND_CONTROL procedure, the best alternative is a code procedure.
This is one of the few circumstances in which a code procedure is both
appropriate and palatable.  It is appropriate because the intent is to
emit a specific short sequence of machine-code instructions.  It is
palatable because the sequence is only one instruction long.

A case study that SofTech did for CECOM (Ft. Monmouth) in 1982 pointed
out another problem, in addition to those mentioned by Rabbie, with the
use of assignment statements:  An assignment to a variable that is
located at an I/O address is typically not followed by a reference to
that variable.  Thus the variable looks "dead" to data-flow analysis and
the assignment is likely to be eliminated as useless by an optimizing
compiler.  (A strong case can be made that a compiler for a machine with
memory-mapped I/O must never treat an assignment as useless if the
target variable is subject to an address clause, but a case can also be
made to justify this behavior.)

Norman Cohen

             reply	other threads:[~1990-01-18 14:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1990-01-18 14:19 "Norman H. Cohen" [this message]
  -- strict thread matches above, loose matches on Subject: below --
1990-01-16 17:58 Memory-mapped I/O Harold Rabbie
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox