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

zkasm: remove code pertinent to vector and float registers #48

Merged
merged 2 commits into from
Oct 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 6 additions & 9 deletions cranelift/codegen/src/isa/zkasm/abi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,16 @@ impl ABIMachineSpec for ZkAsmMachineDeps {
where
I: IntoIterator<Item = &'a ir::AbiParam>,
{
// FIXME(nagisa): this code needs to be rewritten for zkasm
//
// All registers that can be used as parameters or rets.
// both start and end are included.
let (x_start, x_end, f_start, f_end) = match (call_conv, args_or_rets) {
(isa::CallConv::Tail, _) => (10, 11, 0, 0),
(_, ArgsOrRets::Args) => (10, 11, 0, 0),
(_, ArgsOrRets::Rets) => (10, 11, 0, 0),
let (x_start, x_end) = match (call_conv, args_or_rets) {
(isa::CallConv::Tail, _) => (10, 11),
(_, ArgsOrRets::Args) => (10, 11),
(_, ArgsOrRets::Rets) => (10, 11),
};
let mut next_x_reg = x_start;
let mut next_f_reg = f_start;
// Stack space.
let mut next_stack: u32 = 0;

Expand Down Expand Up @@ -116,10 +117,6 @@ impl ABIMachineSpec for ZkAsmMachineDeps {
let x = Some(x_reg(next_x_reg));
next_x_reg += 1;
x
} else if (next_f_reg <= f_end) && *rc == RegClass::Float {
let x = Some(f_reg(next_f_reg));
next_f_reg += 1;
x
} else {
None
};
Expand Down
Loading