Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TRT in Amode64 does not clear high word of R1 #596

Open
abekornelis opened this issue Jan 18, 2025 · 2 comments
Open

TRT in Amode64 does not clear high word of R1 #596

abekornelis opened this issue Jan 18, 2025 · 2 comments
Assignees
Labels
bug Something isn't working component-core Related to core components (java) Lang:Java

Comments

@abekornelis
Copy link
Collaborator

Reported by Bob Schulien, email dd 2025-01-16, 10:08

The TRT instruction does not clear the high half of R1 if the CPU is in AMODE 64.
LGHI R1,-1
TRT FIELD,TRT_TABLE
IF (NZ)
R1 high half is still high-values/not a 64 bit address.
ENDIF
Workaround is to do a LGHI R1,0 before the TRT.

@abekornelis abekornelis added bug Something isn't working component-core Related to core components (java) Lang:Java labels Jan 18, 2025
@abekornelis
Copy link
Collaborator Author

Additional documentation on the error:
Issue596.txt

@jyganci
Copy link
Contributor

jyganci commented Jan 23, 2025

While looking at pz390.java , two additional instructions, TRTR and EDMK, also do not set the high half of GR1 when running in 64-bit addressing mode. Also, RPI 828 incorrectly set the R1 value when TRTR finds a match when running in 31-bit addressing mode. POP for TRTR states "In the 31-bit addressing mode, the address replaces bits 33-63 of general register 1, and bits 0-32 of this register remain unchanged." This is different from what happens for TRT in 31-bit mode, which is what RPI 828 fixed. RPI 828 zeros bit 32 of R1. This should NOT be done for TRTR. RPI 828 correctly zeros R1 bit 32 for TRT and EDMK in 31-bit mode.

@jyganci jyganci self-assigned this Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working component-core Related to core components (java) Lang:Java
Projects
None yet
Development

No branches or pull requests

2 participants