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

Incorrect ScInstr attribute for IMULH_R & ISMULH_R #33

Open
Boog900 opened this issue Sep 11, 2023 · 0 comments
Open

Incorrect ScInstr attribute for IMULH_R & ISMULH_R #33

Boog900 opened this issue Sep 11, 2023 · 0 comments

Comments

@Boog900
Copy link

Boog900 commented Sep 11, 2023

Mithril sets group_par_is_source to true for IMULH_R & ISMULH_R and does not set can_reuses to true

ScOpcode::IMULH_R => ScInstr {
info,
dst: -1,
src: -1,
mod_v: 0,
imm32: 0,
op_group: ScOpcode::IMULH_R,
group_par_is_source: true,
can_reuse: false,
op_group_par: gen.get_u32() as i32,
},
ScOpcode::ISMULH_R => ScInstr {
info,
dst: -1,
src: -1,
mod_v: 0,
imm32: 0,
op_group: ScOpcode::ISMULH_R,
group_par_is_source: true,
can_reuse: false,
op_group_par: gen.get_u32() as i32,

This is different to the reference implementation:

https://github.com/tevador/RandomX/blob/1c603a23fa0004615b4f2d42ad95f2693f16093b/src/superscalar.cpp#L465-L480

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

1 participant