We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
在尝试实现&调试“条件跳转指令”过程中,遇到PC、offset计算问题。 按JVM文档、资料、class二进制内容,得到的结果都是新地址为
offset+PC 其中 offste = (operand1<<8)|operand2
但本项目中,PC地址似乎保存的是第N条指令,于是直接加offset,会超出operands数组长度范围
参考项目,如 https://github.com/zachaxy/JVM/ 的 blob/master/Java/src/instructions/base/BytecodeReader.java
程序自己维护PC,并且每读出一个 UINT8 内容,会递增 PC 这个才比较符合JVM规范的说明
The text was updated successfully, but these errors were encountered:
确实之前pc的实现,没有仔细去查阅文档,想当然就实现了,非常感谢你能指出。如果你有精力,欢迎提交patch :P
Sorry, something went wrong.
感谢确认,花了几天时间才确认这个问题 333
我会尝试一下增加该部分处理:)
No branches or pull requests
在尝试实现&调试“条件跳转指令”过程中,遇到PC、offset计算问题。
按JVM文档、资料、class二进制内容,得到的结果都是新地址为
offset+PC 其中 offste = (operand1<<8)|operand2
但本项目中,PC地址似乎保存的是第N条指令,于是直接加offset,会超出operands数组长度范围
参考项目,如 https://github.com/zachaxy/JVM/ 的 blob/master/Java/src/instructions/base/BytecodeReader.java
The text was updated successfully, but these errors were encountered: