Repository navigation
Conversation
7b76fde to
5ec3ec0
Compare
5ec3ec0 to
2485c24
Compare
|
Thanks a lot for this -- I saw #61 but didn't have time to look into it yet. |
| println!("[3] my_bool: {}", my_bool.read()); | ||
| println!("[3] my_i32: {}", my_i32.read()); | ||
|
|
||
| // Including this large variable on the stack will trigger a call to |
There was a problem hiding this comment.
Nice! The 2/3/4 examples are intended to be copy-pastes of the first one (for the CI). Can you please put this into all of them?
In the future we will probably move these runtime tests somewhere else, but for now it is good to have them here. +1
|
This doesn't fix #61 by the way. |
| extra-$(CONFIG_RUST) += exports_core_generated.h exports_alloc_generated.h | ||
| extra-$(CONFIG_RUST) += exports_kernel_generated.h | ||
| extra-$(CONFIG_RUST) += exports_compiler_builtins_generated.h |
There was a problem hiding this comment.
Same here
| extra-$(CONFIG_RUST) += exports_core_generated.h exports_alloc_generated.h | |
| extra-$(CONFIG_RUST) += exports_kernel_generated.h | |
| extra-$(CONFIG_RUST) += exports_compiler_builtins_generated.h | |
| extra-$(CONFIG_RUST) += exports_core_generated.h | |
| extra-$(CONFIG_RUST) += exports_compiler_builtins_generated.h | |
| extra-$(CONFIG_RUST) += exports_alloc_generated.h | |
| extra-$(CONFIG_RUST) += exports_kernel_generated.h |
| $(objtree)/rust/exports_compiler_builtins_generated.h: exports_target_type := _RUST | ||
| $(objtree)/rust/exports_compiler_builtins_generated.h: $(objtree)/rust/compiler_builtins.o FORCE | ||
| $(call if_changed,exports) | ||
|
|
There was a problem hiding this comment.
Can you please move these in-between core and alloc? (I keep them like that due to the dependency chain).
| #include "exports_core_generated.h" | ||
| #include "exports_alloc_generated.h" | ||
| #include "exports_kernel_generated.h" | ||
| #include "exports_compiler_builtins_generated.h" |
Yeah, I just saw your comment there -- nevertheless, one less thing to sort out! |
|
I don't think all symbols in compiler builtins should be exported. Many should already be defined by the compiler-rt used by Linux. Only a few |
It's only exporting the symbols with the prefix |
|
None of these symbols would cause conflicts, but the |
|
It looks like we won't need the |
__rust_probestack can be linked
|
Changed this to just include the large stack test. Maybe we should temporarily set |
| // `compiler_builtins::probestack::__rust_probestack` on x86_64. | ||
| // This will verify that we are able to link modules which call | ||
| // `__rust_probestack`. | ||
| let x: [u64; 1028] = [5; 1028]; |
There was a problem hiding this comment.
| let x: [u64; 1028] = [5; 1028]; | |
| let x: [u64; 1028] = core::hint::black_box([5; 1028]); |
Requires #![feature(test)], but ensures that it isn't optimized out.
commented
Jan 23, 2021
|
I thought we still wanted to include the test? |
commented
Jan 23, 2021
|
Ah, GitHub closed this automatically because the PR was against a branch that was deleted (?!) -- it wasn't me doing it! :-) And it does not allow me to reopen it since the branch is gone... Please rebase it against |
commented
Jan 24, 2021
|
Weird - I thought there was some way to change the target branch when that happens... |
Addresses #73.
We need to export the symbols from
compiler_builtinsso that modules can reference__rust_probestack.