You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The instructions marked as bold are recognized as Syntax error by the Plugin. The error description is: Error at LAY instruction: value of address Operand displacement value must be between -2048 and 2047.
Example:
DoItAgain MVCOS 0(R14),0(R2),R10 Move data to output area
LAY R2,4096(,R2) Prepare source > 4 K
LAY R14,4096(,R14) Prepare target for > 4k
AHI R10,-4096 Check if bytes left
JP DoItAgain
There are two Problems with this.
The error would be correct if i had something like LA R2,4096 BUT the range in the error message i.e. -2048 and 2047 is wrong cause LA does not allow signed values. So if i had something like LA R2,-100(,R2) in my Code, the Plugin would be happy but HLASM would throw an "Invalid displacement" error, cause a 12 Bit displacement has to be between 0 and 4095.
The z990 processors support “long displacement (20-Bit)” RX-format instructions (RXY-a), with a displacement field range of -524288 to +524287 (± 0.5 Megabyte). All of the z/Architecture RX-format instructions introduced by the z900 are “long displacement” except for the floating point instructions. There are “Y” (long displacement) forms of most of the ESA/390 RX-format instructions except branch and as already mentioned floating Point intructions. Examples: AY, AHY, LY, LAY, STY
So the LAY instructions in the above example are perfectly valid and should never be flagged as error. For 12-Bit displacement intructions the error message text is wrong.
The text was updated successfully, but these errors were encountered:
Thank you for nicely described bug!
I have already found it in code - unfortunately all 20 bit displacements were validated as if they were signed 12 bit displacements.
That was fast Michal, thanks! Found some other quirks today but i thought i collect them first and open one Report with what i have found so far. Did you also fix the wrong error message text? 12-Bit displacement have Always to be positiv numbers with a valid range of 0 to 4095.
The instructions marked as bold are recognized as Syntax error by the Plugin. The error description is: Error at LAY instruction: value of address Operand displacement value must be between -2048 and 2047.
Example:
DoItAgain MVCOS 0(R14),0(R2),R10 Move data to output area
LAY R2,4096(,R2) Prepare source > 4 K
LAY R14,4096(,R14) Prepare target for > 4k
AHI R10,-4096 Check if bytes left
JP DoItAgain
There are two Problems with this.
The error would be correct if i had something like LA R2,4096 BUT the range in the error message i.e. -2048 and 2047 is wrong cause LA does not allow signed values. So if i had something like LA R2,-100(,R2) in my Code, the Plugin would be happy but HLASM would throw an "Invalid displacement" error, cause a 12 Bit displacement has to be between 0 and 4095.
The z990 processors support “long displacement (20-Bit)” RX-format instructions (RXY-a), with a displacement field range of -524288 to +524287 (± 0.5 Megabyte). All of the z/Architecture RX-format instructions introduced by the z900 are “long displacement” except for the floating point instructions. There are “Y” (long displacement) forms of most of the ESA/390 RX-format instructions except branch and as already mentioned floating Point intructions. Examples: AY, AHY, LY, LAY, STY
So the LAY instructions in the above example are perfectly valid and should never be flagged as error. For 12-Bit displacement intructions the error message text is wrong.
The text was updated successfully, but these errors were encountered: