Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
TomAFrench committed Aug 30, 2024
1 parent 1e77d17 commit ce2835d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -276,14 +276,14 @@ impl<F: AcirField + DebugToString, Registers: RegisterAllocator> BrilligContext<
let index_at_end_of_array = self.allocate_register();
let end_value_register = self.allocate_register();

self.mov_instruction(index_at_end_of_array, vector.size);
self.mov_instruction(index_at_end_of_array, size);

self.codegen_loop(iteration_count, |ctx, iterator_register| {
// The index at the end of array is size - 1 - iterator
ctx.codegen_usize_op_in_place(index_at_end_of_array, BrilligBinaryOp::Sub, 1);

// Load both values
ctx.codegen_array_get(vector.pointer, iterator_register, start_value_register);
ctx.codegen_array_get(pointer, iterator_register, start_value_register);
ctx.codegen_array_get(
pointer,
SingleAddrVariable::new_usize(index_at_end_of_array),
Expand Down

0 comments on commit ce2835d

Please sign in to comment.