hercules-390 / hyperion

Hercules 390
Other
246 stars 69 forks source link

SERVC cannot handle addresses >=4GB #292

Open jeffpc opened 2 years ago

jeffpc commented 2 years ago

I was noodling around with some standalone code and I ran into what I believe is a bug. Specifically, when I issue the SERVC instruction with a real address that's >=4GB to print a message in the hercules window, "nothing" happens. Looking at the code [1,2], it would appear that the SERVC instruction handler gets the address from the register using GR_L and then stores it in a U32 before applying prefixing. I couldn't find any documentation for how SERVC is supposed to behave, but it seems weird that it would use the low 32 bits of the register (instead of 31) if truncating the address was truly the intention.

[1] https://github.com/hercules-390/hyperion/blob/master/service.c#L1099 [2] https://github.com/hercules-390/hyperion/blob/master/service.c#L1162