On 8/3/2025 10:52 AM, Dan Greiner wrote:
Hello Yves,
This was the sort of cleverness for which I was looking.
Obviously, one could effect the same result by having three separate SAMxx
statements, and the EX instruction could choose which one to use. However this
case requires only a single SAM24 instruction which can then transmogrify into
the other two.
From a performance perspective, the SAMxx instructions allow the
pipeline to know the effective addressing mode when performing address
resolution down a prefetched logic path. Using the EX instruction (which
depends on run-time register contents) hides this knowledge from the
pipeline. The same was true decades ago when the pointer-defined linkage
instructions (BASSM and BSM) were the only way to change addressing
mode, resulting in significant performance penalties when the addressing
mode changed. The SAMxx instructions solved those issues nicely.
This EX approach takes us back to those dark days and is ill-advised...
--
Phoenix Software International
Edward E. Jaffe
831 Parkview Drive North
El Segundo, CA 90245
https://www.phoenixsoftware.com/
--------------------------------------------------------------------------------
This e-mail message, including any attachments, appended messages and the
information contained therein, is for the sole use of the intended
recipient(s). If you are not an intended recipient or have otherwise
received this email message in error, any use, dissemination, distribution,
review, storage or copying of this e-mail message and the information
contained therein is strictly prohibited. If you are not an intended
recipient, please contact the sender by reply e-mail and destroy all copies
of this email message and do not otherwise utilize or retain this email
message or any or all of the information contained therein. Although this
email message and any attachments or appended messages are believed to be
free of any virus or other defect that might affect any computer system into
which it is received and opened, it is the responsibility of the recipient
to ensure that it is virus free and no responsibility is accepted by the
sender for any loss or damage arising in any way from its opening or use.