On 2021-03-12 00:41, Peter Relson wrote:
To add to what Charles M posted,
Don't forget that LA in AMODE 31 always zeroes bit 32, and LA in AMODE
24
zeroes bits 32-39 of the 64-bit GR.
That's another way that they are not functionally equivalent, if that
difference matters to you.
A good rule
On 2021-03-12 00:38, Paul Gilmartin wrote:
On 2021-03-10, at 22:10:14, robi...@dodo.com.au wrote:
...
You can use LA to subtract 1 if you have a negative value
in a base register, subject to the same limit.
Why would you do that, when BCTR R,0 will do it for free
with even zero as the so
: ASSEMBLER-LIST@LISTSERV.UGA.EDU
Subject: Add 1, Subtract 1
I was taught long ago to add 1 to a register using LA r#,1(,r#) and to subtract
1 using BCTR r#,0.
Is the fastest way now to use AHI r#,1 and AHI r#,-1?
To add to what Charles M posted,
Don't forget that LA in AMODE 31 always zeroes bit 32, and LA in AMODE 24
zeroes bits 32-39 of the 64-bit GR.
That's another way that they are not functionally equivalent, if that
difference matters to you.
A good rule of thumb is that when you have equivalent a
: Add 1, Subtract 1
1. "Instruction speed" is not exactly a concept anymore due to pipelining.
An instruction can take literally zero effective time because it overlaps
with something else such as a wait for cache. "Does an AHI or an LA take
longer?" is no longer a question that ha
On 2021-03-10, at 22:10:14, robi...@dodo.com.au wrote:
> ...
>>
>> You can use LA to subtract 1 if you have a negative value
>> in a base register, subject to the same limit.
>
> Why would you do that, when BCTR R,0 will do it for free
> with even zero as the source register (you get true -1
Actually, I think 'small' means a 12 bit unsigned binary integer for LA and 20
bits for LAY. And with LAY you can simply express the displacement as a
negative.
>> LA is good fir small values.
>
>"Small" means when you can tolerate truncation to 24 or 31 bits.
>You can use LA to subtract 1 i
On 2021-03-11 15:56, Paul Gilmartin wrote:
On 2021-03-10, at 18:21:11, Robin Vowels wrote:
From: "Schmitt, Michael"
Sent: Thursday, March 11, 2021 10:26 AM
I was taught long ago to add 1 to a register using LA r#,1(,r#)
and to subtract 1 using BCTR r#,0.
Is the fastest way now to use AHI r
> On 2021-03-10, at 18:21:11, Robin Vowels wrote:
>
> From: "Schmitt, Michael"
> Sent: Thursday, March 11, 2021 10:26 AM
>
>
>> I was taught long ago to add 1 to a register using LA r#,1(,r#) and to
>> subtract 1 using BCTR r#,0.
>
>> Is the fastest way now to use AHI r#,1 and AHI r#,-1?
>
>
er List [mailto:ASSEMBLER-LIST@LISTSERV.UGA.EDU
> ]
> On Behalf Of Schmitt, Michael
> Sent: Wednesday, March 10, 2021 3:26 PM
> To: ASSEMBLER-LIST@LISTSERV.UGA.EDU
> Subject: Add 1, Subtract 1
>
> I was taught long ago to add 1 to a register using LA r#,1(,r#) and to
> subtract 1 using BCTR r#,0.
>
> Is the fastest way now to use AHI r#,1 and AHI r#,-1?
>
From: "Schmitt, Michael"
Sent: Thursday, March 11, 2021 10:26 AM
I was taught long ago to add 1 to a register using LA r#,1(,r#) and to subtract
1 using BCTR r#,0.
Is the fastest way now to use AHI r#,1 and AHI r#,-1?
LA and BCTR are good when you don't want to change the CC.
BCTR R,0 is
arch 10, 2021 5:00 PM
To: ASSEMBLER-LIST@LISTSERV.UGA.EDU
Subject: Re: Add 1, Subtract 1
Hi Michael,
You may want to check out the IBM Z optimization primers if you're super
serious about this. Here's a link, and I believe there's a z15 version as
well in 2020...
https://communi
Sorry: LHI in the below should be AHI, of course.
Charles
-Original Message-
From: IBM Mainframe Assembler List [mailto:ASSEMBLER-LIST@LISTSERV.UGA.EDU]
On Behalf Of Charles Mills
Sent: Wednesday, March 10, 2021 4:56 PM
To: ASSEMBLER-LIST@LISTSERV.UGA.EDU
Subject: Re: Add 1, Subtract 1
:ASSEMBLER-LIST@LISTSERV.UGA.EDU] On
Behalf Of Schmitt, Michael
Sent: Wednesday, March 10, 2021 6:26 PM
To: ASSEMBLER-LIST@LISTSERV.UGA.EDU
Subject: Add 1, Subtract 1
Caution! This message was sent from outside your organization.
I was taught long ago to add 1 to a register using LA r#,1(,r#) and to subtract
If you have to ask, it doesn't matter.
sas
On Wed, Mar 10, 2021 at 6:27 PM Schmitt, Michael
wrote:
> I was taught long ago to add 1 to a register using LA r#,1(,r#) and to
> subtract 1 using BCTR r#,0.
>
> Is the fastest way now to use AHI r#,1 and AHI r#,-1?
>
ailto:ASSEMBLER-LIST@LISTSERV.UGA.EDU]
On Behalf Of Schmitt, Michael
Sent: Wednesday, March 10, 2021 3:26 PM
To: ASSEMBLER-LIST@LISTSERV.UGA.EDU
Subject: Add 1, Subtract 1
I was taught long ago to add 1 to a register using LA r#,1(,r#) and to
subtract 1 using BCTR r#,0.
Is the fastest way now to us
I was taught long ago to add 1 to a register using LA r#,1(,r#) and to subtract
1 using BCTR r#,0.
Is the fastest way now to use AHI r#,1 and AHI r#,-1?
17 matches
Mail list logo