Commit Graph

315 Commits

Author SHA1 Message Date
Atul Bhosale
f481a4b685
Format code using 'cargo fmt' 2019-08-31 22:58:09 +05:30
bjorn3
d9d8c69af1 Split extract layout field of all CPlace variants into a sparate struct 2019-08-29 11:23:19 +02:00
bjorn3
2a20cc0b94 Use anonymous lifetimes where possible 2019-08-18 16:52:07 +02:00
bjorn3
32cb5b8c8e Move discriminant get and set to discriminant.rs 2019-08-14 12:01:41 +02:00
bjorn3
883894a07a Move trans_*_binop to num.rs 2019-08-14 11:52:39 +02:00
bjorn3
11b2b86b08 Fix some rustc tests
* Check for `#[rustc_error]` attribute.
* Use the same weak static type error message as cg_llvm
2019-08-13 19:42:16 +02:00
bjorn3
f02d135057 Print error for #[rustc_def_path] like expected 2019-08-13 19:39:46 +02:00
bjorn3
9041db962d Fix it 2019-08-11 17:06:18 +02:00
bjorn3
fb3fa677fa Call assert_module_sources 2019-08-04 13:42:03 +02:00
bjorn3
b806070a88 Fix simd_cast 2019-07-31 09:46:05 +02:00
bjorn3
1a26891170 Replace llvm intrinsics with runtime trap 2019-07-29 11:03:55 +02:00
bjorn3
bdf23c0201 Don't set opt_level to best
LICM is still broken
2019-07-27 16:12:48 +02:00
bjorn3
fe20f8cba6 Rustup to rustc 1.38.0-nightly (c43753f91 2019-07-26) 2019-07-27 11:35:46 +02:00
bjorn3
0a833ba8a1 [WIP] 2019-07-26 11:32:04 +02:00
bjorn3
5180becc7c Fix 128bit CValue::const_val 2019-07-26 11:30:39 +02:00
bjorn3
641a210ff6 Implement most 128bit binops 2019-07-26 11:29:35 +02:00
bjorn3
8c2577c747 Don't disable stdsimd anymore
This doesn't enable simd support. Actually using the functions will
result in a compilation error.
2019-07-20 15:33:57 +02:00
bjorn3
d0db8f0cac
Rustup 2019-07-08 09:54:18 +02:00
bjorn3
c2e6822342 Rustup to rustc 1.37.0-nightly (0beb2ba16 2019-07-02)
Also removes some unnecessary errors.
2019-07-03 16:49:47 +02:00
bjorn3
4d406cdcad Rustup to rustc 1.37.0-nightly (0dc9e9c10 2019-06-15) 2019-06-16 11:13:49 +02:00
bjorn3
6d1bc088a7 Rustup to rustc 1.37.0-nightly (2887008e0 2019-06-12) 2019-06-13 20:44:40 +02:00
bjorn3
e8c50cf2c2 Read and write dylib metadata 2019-06-11 16:45:14 +02:00
bjorn3
466ecad2f0 Move CValue and CPlace to separate file and remove duplicate scalar_to_clif_type 2019-06-11 15:43:22 +02:00
bjorn3
161c8aa5cf Rustup to rustc 1.37.0-nightly (7cdaffd79 2019-06-05) 2019-06-06 20:31:09 +02:00
bjorn3
b625e56488 Rustup to rustc 1.37.0-nightly (3ade426ed 2019-05-30) 2019-05-31 10:56:55 +02:00
bjorn3
d078fde07a Rustup to rustc 1.36.0-nightly (dec4c5201 2019-05-24) 2019-05-25 12:30:21 +02:00
bjorn3
0046ce4c85 Partial support for wasm32-unknown-wasi as host triple
This needs a rustc compiled for wasi (see rust-lang/miri#722)
It also needs CraneStation/target-lexicon#14
2019-05-11 12:23:40 +02:00
bjorn3
bb7a990ee7 Extract driver.rs 2019-05-04 16:54:25 +02:00
bjorn3
98dae86d21 Update cranelift 2019-05-04 16:15:20 +02:00
bjorn3
8598a34e45 Rustup to rustc 1.36.0-nightly (a3404557c 2019-05-03) 2019-05-04 14:57:41 +02:00
bjorn3
11d816cce5 Rustup to rustc 1.36.0-nightly (597f43248 2019-04-26) 2019-04-27 17:44:12 +02:00
bjorn3
f096ad14a3 Change module names back 2019-04-24 20:54:01 +02:00
bjorn3
e8db15f662 Fix filename length for ar files 2019-04-24 19:00:21 +02:00
bjorn3
472b591f90 Use rustc_codegen_ssa:🔙:link instead of copy pasted version 2019-04-24 19:00:21 +02:00
bjorn3
de792ad690 Rustup to rustc 1.35.0-nightly (aa99abeb2 2019-04-14) 2019-04-15 16:34:16 +02:00
bjorn3
d9403bf3fd Implement weak linkage for statics 2019-03-11 20:36:29 +01:00
bjorn3
bfe8c89d41 Remove "Saved incremental data" warning 2019-03-11 20:06:23 +01:00
bjorn3
27e9cfc79f Rustup to rustc 1.35.0-nightly (9d71ec135 2019-03-10) 2019-03-11 20:02:47 +01:00
bjorn3
6c88af3438 Rustup to rustc 1.34.0-nightly (7e001e5c6 2019-02-27) 2019-02-28 10:55:21 +01:00
bjorn3
f02490d960 Rustfmt 2019-02-21 15:06:09 +01:00
bjorn3
b4eff78a9e Pass command-line arguments to JITed function
Cherry-picked from f1f35405e15ca1b77425514b04b96b2749231899 by
@milkey-mouse
2019-02-18 18:53:18 +01:00
bjorn3
4bb8bfca94 Disable macOS debuginfo and on all platforms optimizations 2019-02-11 19:11:55 +01:00
bjorn3
a272efa030 Fix alloc_example 2019-02-11 15:29:46 +01:00
bjorn3
09c4569c87 Implement line debuginfo 2019-01-26 11:59:57 +01:00
bjorn3
8a586eb6cb Rustup to rustc 1.33.0-nightly (68fe5182c 2019-01-05) 2019-01-06 15:27:20 +01:00
bjorn3
16e43c9d21 Fix unsize coercions and the size_of_val and min_align_of_val intrinsics for custom dst's 2018-12-29 15:36:17 +01:00
bjorn3
8f2ca706c2 Setup env_logger 2018-12-29 12:04:35 +01:00
bjorn3
3d05ff922c Use the linkage and visibility produced by tcx.collect_and_partition_mono_itemscc #209 2018-12-23 19:41:35 +01:00
bjorn3
6fa3140222 Introduce CodegenCx 2018-12-18 18:28:02 +01:00
bjorn3
0530d5225f Disable probestack 2018-12-15 17:17:10 +01:00
bjorn3
c8d435aade Put allocator shim in a different object file 2018-12-13 15:24:14 +01:00
bjorn3
77e3612581 Move emit_module a bit up 2018-12-13 15:24:14 +01:00
bjorn3
978add3698 Convenience functions for creating and emitting faerie modules 2018-12-13 15:24:14 +01:00
bjorn3
bc687ee992 Prepare for emitting separate object files for each codegen unit 2018-12-13 15:24:14 +01:00
bjorn3
4d0dba944c Some refactorings for codegen_mono_items 2018-12-12 16:01:34 +01:00
bjorn3
94eac08a48 Extract TargetIsa building to a separate function 2018-12-12 15:11:15 +01:00
bjorn3
bd4b307b42 Support dylibs 2018-12-10 15:10:12 +01:00
bjorn3
3c364134ec Restructure scripts and add flamegraph generator 2018-12-03 18:50:00 +01:00
bjorn3
a16e85707d Rustup to rustc 1.32.0-nightly (3e90a12a8 2018-11-29) 2018-11-30 18:08:08 +01:00
bjorn3
95539518ec Rustfmt 2018-11-24 12:47:53 +01:00
bjorn3
830522af6d Implement BackendTypes for FunctionCx 2018-11-24 11:42:57 +01:00
bjorn3
6559029b9d Use rustc_codegen_ssa::CodegenResults 2018-11-24 11:25:11 +01:00
bjorn3
8e28d80a3d Better use of CodegenResults::modules 2018-11-24 11:25:11 +01:00
bjorn3
f4ae9a4dbb Rustup to rustc 1.32.0-nightly (1f57e4841 2018-11-23) 2018-11-24 11:23:49 +01:00
bjorn3
06202c007c Fix some 2018 edition idioms 2018-11-17 18:23:52 +01:00
bjorn3
2c38313403 Move unimpl! macro to unimpl.rs 2018-11-16 19:53:27 +01:00
bjorn3
8233ade789 Set cranelift opt_level based on -Copt-level 2018-11-16 18:13:43 +01:00
bjorn3
e83da7533c Move trapping to trap_code.rs 2018-11-16 17:35:47 +01:00
bjorn3
0fa5c0f4fa Rustup to rustc 1.32.0-nightly (9fefb6766 2018-11-13) 2018-11-14 14:31:42 +01:00
bjorn3
29e1d617d4 Remove commented out code 2018-11-11 11:40:41 +01:00
bjorn3
f955c8ef2a Move all functions in link.rs copied from cg_llvm to link_copied.rs 2018-11-11 11:40:41 +01:00
bjorn3
640d66c777 Call linker from cg_clif 2018-11-11 11:40:31 +01:00
bjorn3
b9c648daed Rustfmt 2018-11-10 15:12:00 +01:00
bjorn3
c88353c942 Warn and error about some things and make METADATA_FILENAME an &str 2018-11-10 15:01:01 +01:00
bjorn3
9ceb1a170b Misc renames and changes 2018-11-10 12:49:25 +01:00
bjorn3
7d602513b1 Rustup to rustc 1.32.0-nightly (653da4fd0 2018-11-08) 2018-11-09 17:54:28 +01:00
bjorn3
d0a3f99214 Introduce link module 2018-11-07 14:04:44 +01:00
bjorn3
0b76af2095 Remove should_codegen 2018-11-07 13:35:10 +01:00
bjorn3
29b4c34c54 Rustfmt 2018-11-07 13:32:02 +01:00
bjorn3
b73bda1c3f Fix warnings 2018-11-07 13:31:02 +01:00
bjorn3
648f491977 Enable feature gate extern_crate_item_prelude 2018-11-07 13:29:38 +01:00
bjorn3
4e4cad8a20 Allocator shim 2018-11-05 18:29:15 +01:00
bjorn3
f19f8e4b49 Use tcx.collect_and_partition_mono_items 2018-11-05 18:27:10 +01:00
bjorn3
d67fd16982 Use cg_utils::symbol_export::provide{,_extern} 2018-11-05 18:13:58 +01:00
bjorn3
c080c0bfec Misc changes 2018-11-03 15:04:27 +01:00
bjorn3
fc8a6c343a Update Cargo.lock
Also update for cranelift changes.
2018-11-03 13:14:28 +01:00
bjorn3
ab9a0b7724 Change name of metadata file to rust.metadata.bin to match cg_llvm 2018-10-25 14:59:02 +02:00
bjorn3
75baefebbb Enable codegen by default 2018-10-23 10:57:09 +02:00
bjorn3
35d4d22e5c Rustup to rustc 1.31.0-nightly (424a749a0 2018-10-21) 2018-10-22 11:06:09 +02:00
bjorn3
397c6843d0 Rustup to rustc 1.31.0-nightly (155510e37 2018-10-20) and fix test 2018-10-21 16:32:19 +02:00
bjorn3
a139f73f77 Move maybe_create_entry_wrapper to main_shim.rs 2018-10-20 18:41:26 +02:00
bjorn3
3f574e9f7b Use ranlib instead of ar x 2018-10-20 15:19:07 +02:00
bjorn3
42b6d734bf Rustup to rustc 1.31.0-nightly (46880f41b 2018-10-15) 2018-10-16 14:16:37 +02:00
bjorn3
b5dffe9765 Rustfmt 2018-10-10 19:07:13 +02:00
bjorn3
4177e804e9 Some more changes 2018-10-10 19:04:20 +02:00
bjorn3
0fa547ac98 Use absolute compile time paths for some log files 2018-10-06 14:48:34 +02:00
bjorn3
a94dd977bf Move intrinsics codegen to intrinsics.rs 2018-10-03 18:21:52 +02:00
bjorn3
742a795c78 Use FunctionBuilder::call_mem{cpy,move} 2018-09-26 15:42:07 +02:00
bjorn3
a83e7766b7 Update Cargo.lock 2018-09-22 13:55:23 +02:00
bjorn3
a1b8e02a88 Rustup to rustc 1.30.0-nightly (cb6d2dfa8 2018-09-16) 2018-09-17 18:49:10 +02:00
bjorn3
7c510c0661 Remove some code 2018-09-16 17:48:13 +02:00
bjorn3
e7ca9a186b Fix jit 2018-09-09 14:45:23 +02:00
bjorn3
6196146ac4 Implement trait objects (cc #14) 2018-09-08 18:00:06 +02:00
bjorn3
62a0203a5a Rustfmt 2018-09-08 17:24:52 +02:00
bjorn3
d549d0f180 Update Cargo.lock 2018-09-05 19:43:42 +02:00
bjorn3
42066522fb Perform some optimizations 2018-09-02 13:36:45 +02:00
bjorn3
b5082f7da8 Support unsized types 2018-08-30 20:21:21 +02:00
bjorn3
42887dfdd9 Remove CodegenCx 2018-08-26 16:58:52 +02:00
bjorn3
e66f012d79 Remove stabilized feature gate 2018-08-26 16:28:00 +02:00
bjorn3
0d15d9e5dd Rustup to rustc 1.30.0-nightly (63d66494a 2018-08-23) 2018-08-24 14:51:02 +02:00
bjorn3
65641b8872 Rustfmt 2018-08-22 12:31:45 +02:00
bjorn3
954d1e7bf2 Don't hardcode usize being 64 bit (fixes #8) 2018-08-22 10:54:32 +02:00
bjorn3
72f48776a1 Support cross-compiling (untested) 2018-08-18 16:36:47 +02:00
bjorn3
871be2a469 Codegen entry wrapper (fixes #13) 2018-08-17 13:21:03 +02:00
bjorn3
7a3ba963e1 Rustfmt 2018-08-17 13:01:56 +02:00
bjorn3
f27dfc3ac9 Make CodegenCx generic over Backend 2018-08-17 12:57:41 +02:00
bjorn3
7d3f2ba49f Change build.sh 2018-08-15 15:24:05 +02:00
bjorn3
7f2a8f8a66 Disable some example which don't compile yet 2018-08-15 14:49:36 +02:00
bjorn3
7f2a887c83 Use either SimpleJIT or faerie, but not both 2018-08-15 14:45:32 +02:00
bjorn3
e6fb515406 Craneliftup 2018-08-15 12:36:13 +02:00
bjorn3
b752c88fef Put metadata loader in its own file 2018-08-15 12:07:08 +02:00
bjorn3
5ea8bae114 Rustup to rustc 1.30.0-nightly (67390c0c3 2018-08-14) 2018-08-15 11:34:35 +02:00
bjorn3
a8ca0f02fc Support emitting object files (fixes #5) 2018-08-14 22:01:18 +02:00
bjorn3
0f26781a86 Support simplejit and faerie at the same time 2018-08-14 20:58:24 +02:00
bjorn3
f67ad9c120 Refactoring 2018-08-14 19:42:22 +02:00
bjorn3
0978710ffd Codegen minicore 2018-08-14 12:13:07 +02:00
bjorn3
257a607e3e Change build.sh a bit 2018-08-13 19:40:40 +02:00
bjorn3
c7ed1ce033 Rustfmt 2018-08-13 18:04:39 +02:00
bjorn3
4615359e86 Define data for all allocs during finalization 2018-08-13 16:58:07 +02:00
bjorn3
1031c659e0 Refactoring of constant.rs in preparation for static codegen 2018-08-13 12:13:43 +02:00
bjorn3
23b4db227a Implement basic incremental compilation 2018-08-12 20:49:43 +02:00
bjorn3
5859b9b65d Rustfmt 2018-08-12 18:56:05 +02:00
bjorn3
57ba6411c2 Measure translation speed 2018-08-11 15:21:26 +02:00
bjorn3
46ebc2bc5c Make the hello world example runnable 2018-08-11 15:05:57 +02:00
bjorn3
d5a5aec022 Use get_function_name_and_sig for calling function from backend 2018-08-11 14:10:00 +02:00
bjorn3
50375db36c Rustfmt 2018-08-11 13:59:34 +02:00
bjorn3
dc323d7ffa Don't call finalize_all and then finalize_function 2018-08-11 12:07:42 +02:00
bjorn3
a45f0ee6e3 Add a log for unimplemented stuff 2018-08-09 15:30:26 +02:00
bjorn3
f4e622cedc Add basic ssa analyzer 2018-08-09 10:46:56 +02:00
bjorn3
7f2e68e38e Better unimplemented stuff handling 2018-08-08 15:38:03 +02:00
bjorn3
5c601f7316 Rustfmt 2018-08-07 16:43:09 +02:00
bjorn3
e0b1176ae5 Update Cargo.lock and rustup to rustc 1.30.0-nightly (73c78734b 2018-08-05) 2018-08-07 16:34:45 +02:00
bjorn3
f001808249 Run rustfmt 0.9.0-nightly (69ad879 2018-07-27) 2018-07-31 12:25:16 +02:00
bjorn3
82dbd07806 Add support for calling C abi functions 2018-07-30 18:20:37 +02:00
bjorn3
37b61e0ca6 Rustup to rustc 1.29.0-nightly (866a71325 2018-07-29) 2018-07-30 16:57:40 +02:00
bjorn3
75a45965bb Add support for binop rem on floats 2018-07-30 15:34:34 +02:00
bjorn3
ae44a1a172 Add support for metadata loading 2018-07-24 14:10:53 +02:00
bjorn3
eb077f67ac Support metadata writing 2018-07-23 11:17:39 +02:00
bjorn3
2b5e55fb17 Refactor fn sig handling in preparation for supporting closures 2018-07-20 13:36:53 +02:00
bjorn3
1138d38d87 Extract abi handling to abi.rs 2018-07-19 19:33:42 +02:00
bjorn3
f52727b8e6 Implement some binops for TyRawPtr 2018-07-18 15:17:22 +02:00
bjorn3
9a9054ad23 Disable define_function to prevent crashing on things cranelift doesn't yet support 2018-07-18 13:43:17 +02:00
bjorn3
af3234cfd7 [WIP] Add arbitrary constant support 2018-07-16 15:13:37 +02:00
bjorn3
4694fa4f3d Move const val handling to constant.rs 2018-07-14 16:45:20 +02:00
bjorn3
a95a6729b1 Implement some more stuff and ignore some unimplemented stuff instead of panicking 2018-07-14 16:39:49 +02:00
bjorn3
92b14263a4 Update to cranelift 0.14 2018-07-14 12:04:15 +02:00
bjorn3
bb017326be Move some code around 2018-06-30 16:37:02 +02:00
bjorn3
7ca1f256cc Remove some cretonne bug workarounds and add ir comments 2018-06-30 16:27:11 +02:00
bjorn3
f62381865f Better monomorphization 2018-06-24 14:01:41 +02:00
bjorn3
0479604be1 Implement some more things 2018-06-23 18:54:15 +02:00
bjorn3
6de95c89d9 Implement enums 2018-06-23 18:26:54 +02:00
bjorn3
c7e7e1fe0f Split common utils out of base.rs 2018-06-22 19:18:53 +02:00
bjorn3
9d40131d81 Add cretonne_module 2018-06-19 19:51:29 +02:00
bjorn3
9f4f9eb1d7 Implement indirect calls 2018-06-18 18:39:07 +02:00
bjorn3
4d615dba0e Initial commit 2018-06-17 18:05:11 +02:00