Closed JamesWekel closed 2 years ago
Good catch, Jim! It looks like the programmer probably meant to use (buf_len & 1)
(ampersand instead of percent). I'll try to get that fixed right away. Thanks for reporting it.
Closed by commit 76c3c54c9ad5c13e431071207fa8c9cd1512fbe3.
TRTE and TRTRE fail to generate a PGM_SPECIFICATION_EXCEPTION when the A bit is 1 and the operand 1 is not an even number.
Currently in
general2.c
(develop branch line 3108), theTRTE
instruction does the following check:https://github.com/SDL-Hercules-390/hyperion/blob/49be931cccfbde1d7b5f757d5879be2dfc131f77/general2.c#L3108-L3109
The issue is
(buf_len % 1)
is always 0 (false), so an oddbuf_len
will not raise the specification exception.The same check is made for the
TRTRE
instruction (develop branch line 3204):https://github.com/SDL-Hercules-390/hyperion/blob/49be931cccfbde1d7b5f757d5879be2dfc131f77/general2.c#L3204-L3205
Jim