What we do for this is use multiple location counters and code in our
prolog/epilog macros to automatically set up a base register for the
part of the CSECT containing the constants. The using range of the base
register is automatically defined to cover only the constants so that no
code inadvertently uses base/displacement branching. The code referring
to constants "just works".

--

Regards, Gord Tomlin
Action Software International
(a division of Mazda Computer Corporation)
Tel: (905) 470-7113, Fax: (905) 470-6507

On 2012-01-10 16:20, McKown, John wrote:
I could use an enhanced CALL macro. I am writing RENT code and trying to be "baseless". For the RENT, I am using CALL 
with MF=(E,(1)) and GPR1 pointing to an array of fullwords in dynamic storage. The parameters within the CALL are a mixture of 
locations within the CSECT (these are read-only "constants") and areas in dynamic storage. Basically the CALL uses an 
"LA  0,..." to load the address of the parameter into GPR0 followed by a "ST 0,n(0,1)" to save the address in 
the parameter area. I wish that there were a way to tell the CALL to use a LARL instruction to address the parameters which are 
within the CSECT. Even if I had to do it on a parameter by parameter indicator, such as prefixing the symbol with an 
"invalid" character. For instance, a !. So my CALL would look like: CALL (15),(!IN_CSECT,IN_DYN),MF=(E,(1)) . So that 
CALL would use

  LARL 0,IN_CSECT
  ST 0,0(0,1)
  LA 0,IN_DYN
  ST 0,4(0,1)
  BALR 14,15

This would eliminate almost all base+index instructions in my current code. 
Well, I still have a few MVCs and CLCs left too.

Am I going too crazy? I'm a bit "register poor" because I really love to keep 
values in registers, rather than do redundant loads and stores.


--
John McKown
Systems Engineer IV
IT

Administrative Services Group

HealthMarkets(r)

9151 Boulevard 26 * N. Richland Hills * TX 76010
(817) 255-3225 phone *
[email protected] * www.HealthMarkets.com

Confidentiality Notice: This e-mail message may contain confidential or 
proprietary information. If you are not the intended recipient, please contact 
the sender by reply e-mail and destroy all copies of the original message. 
HealthMarkets(r) is the brand name for products underwritten and issued by the 
insurance subsidiaries of HealthMarkets, Inc. -The Chesapeake Life Insurance 
Company(r), Mid-West National Life Insurance Company of TennesseeSM and The 
MEGA Life and Health Insurance Company.SM


Reply via email to