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

op_exec_prepareでアライメントエラーが発生する可能性がある #54

Closed
yamam opened this issue Nov 13, 2021 · 2 comments
Closed

Comments

@yamam
Copy link
Contributor

yamam commented Nov 13, 2021

op_exec_prepare()でffが0b11の場合、addrpから4バイト読み込む処理がありますが、addrpが4バイトアライメントになっていない場合、アライメントエラーが発生するCPUもあります(x86、x64は問題ありません)。
PCが4の倍数でない場合に発生します。

addr = cpu->reg.pc + 4U;
err = bus_get_pointer(cpu->core_id, addr, (uint8**)&addrp);

case 0b11:
	cpu->reg.r[30] = (*((uint32*)addrp));
@tmori
Copy link
Contributor

tmori commented Nov 13, 2021

こちらは,rh850版のathrillですね.

@tmori
Copy link
Contributor

tmori commented Nov 13, 2021

本issueは,以下で管理させていただきます.

toppers/athrill-target-rh850f1x#33

athrillとしては,クローズします.

@tmori tmori closed this as completed Nov 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants