> -----Original Message-----
> From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On
> Behalf Of Binyamin Dissen
> Sent: Wednesday, May 30, 2007 11:20 AM
> To: [email protected]
> Subject: Re: Is there a cost in switching AMODEs?
> 
> On Wed, 30 May 2007 09:45:04 -0700 Edward Jaffe
> <[EMAIL PROTECTED]>
> wrote:
> 
> :>Binyamin Dissen wrote:
> :>> Is there much of a cost to switching amodes?
> 
> :>> Is it worth writing code to be able to run completely in 64 bit mode
> (and
> :>> maintain the top half of the registers) or is it fine to switch in and
> out
> :>> when referencing storage above the bar?
> 
> :>> POPs does not indicate anything.
> 
> :>In my experience, excessive switching of addressing mode is quite
> :>expensive. I suspect it's because the entire pipeline must be flushed.
> 
> I didn't see that in the POPs.
> 
> --
> Binyamin Dissen <[EMAIL PROTECTED]>

A pipe-line flush is usually indicated quite clearly in the PoPs as
a "checkpoint synchronization" operation.

My PC routines usually set AMODE(64) quite early (after testing FLCARCH)
and stay in AM64, unless a system service, like SETFRR, requires AM31.

Saving and restoring AM64 is quite painless with the linkage stack
(BAKR,PR) instructions.

The LLGT, LLGTR instructions are quite useful for purifying "dirty"
31-bit pointers.

If you already have "clean" 31-bit pointers, then using LA Rx,0 is
an easy way to clear the entire 64-bit register before loading the
full word pointer. This paradigm provides backward compatibility to
older 31-bit machines.

Using these techniques, my mainline PC routine code runs in AM64
or AM31 without much dual-pathing. Only the entry logic does some
simple tests and cleans pointers. The remainder of the routine works
correctly in either AM31 or AM64 without any further dual-pathing.

Good luck.


Jeffrey D. Smith
Principal Product Architect
Farsight Systems Corporation
700 KEN PRATT BLVD. #204-159
LONGMONT, CO 80501-6452
303-774-9381 direct
303-484-6170 FAX
http://www.farsight-systems.com/
see my résumé at my website (yes, I am looking for employment)

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to