-
Notifications
You must be signed in to change notification settings - Fork 43
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
Update to LLVM 18 (and Rust 1.78) #566
Conversation
7dbc45e
to
826c0e7
Compare
9cbf1c1
to
4bb6ca5
Compare
Should be ready |
src/libfuncs/felt252.rs
Outdated
#[test] | ||
fn felt252_add() { | ||
// run_program_assert_output( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why this is commented?
#[cfg(not(target_arch = "x86_64"))] | ||
const NUM_REGISTER_ARGS: usize = 8; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we don't know about other architectures I'd leave it as #[cfg(target_arch = "aarch64")]
instead.
On architectures that are neither x86_64
nor aarch64
it'll fail with a compilation error. When that happens we can look into them.
if self.invoke_data.len() & 1 != 0 { | ||
self.invoke_data.push(0); | ||
} | ||
} else if self.invoke_data.len() + 1 >= 8 { | ||
} else if self.invoke_data.len() + 1 >= NUM_REGISTER_ARGS { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You missed one 8
value 4 lines below this one in new_len >= 8
.
@@ -247,7 +247,7 @@ mod tests { | |||
tag: 0, | |||
value: JitValue::Struct { | |||
fields: vec![JitValue::Felt252( | |||
syscall_handler.get_block_hash(0, &mut 0).unwrap(), | |||
syscall_handler.get_block_hash(1, &mut 0).unwrap(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this different?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i changed the testsyscall handler to return its input, so we can test with more values
@@ -23,7 +23,7 @@ use cairo_lang_sierra::{ | |||
use melior::{ | |||
dialect::{ | |||
cf, | |||
llvm::{self, r#type::opaque_pointer}, | |||
llvm::{self}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
llvm::{self}, | |
llvm, |
#[cfg_attr(target_arch = "x86_64", repr(C, align(16)))] | ||
#[cfg_attr(not(target_arch = "x86_64"), repr(C, align(16)))] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is no longer necessary (the cfg_attr
).
#[cfg_attr(target_arch = "x86_64", repr(C, align(16)))] | ||
#[cfg_attr(not(target_arch = "x86_64"), repr(C, align(16)))] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is no longer necessary (the cfg_attr
).
* update to llvm 18 * fix clippy * fix * fix clippy * unignore felt to bool bug * unignore tests * unignore test storage_base_address_from_felt252 * fix bench script * comment sec r1 new test * fix ci * upd lockfile * update dockerfile * fix * ignore test * align to 16 on x86 * try * unwrap * fix assert * x * fix * fix get_integer_layout2 * rust 1.78 and fix array from jit * bug * Fix slice from null pointer bug. * clippy * try fix push aligned * update felt abi align * unignore test to not miss it * update runtime to use proper felt abi * evert "update runtime to use proper felt abi" This reverts commit a02993e. * fix push_aligned on x86 with 16 align * format2 * unignore self referencing test * fix get_execution_info_v2 * unignore more tests * remove old todo * uncomment code --------- Co-authored-by: Esteve Soler Arderiu <soler.arderiu@gmail.com>
Fixes #290