rust/src
Alex Crichton 618aeec51f Improve codegen for unchecked float casts on wasm
This commit improves codegen for unchecked casts on WebAssembly targets
to use the singluar `iNN.trunc_fMM_{u,s}` instructions. Previously rustc
would codegen a bare `fptosi` and `fptoui` for float casts but for
WebAssembly targets the codegen for these instructions is quite large.
This large codegen is due to the fact that LLVM can speculate these
instructions so the trapping behavior of WebAssembly needs to be
protected against in case they're speculated.

The change here is to update the codegen for the unchecked cast
intrinsics to have a wasm-specific case where they call the appropriate
LLVM intrinsic to generate the right wasm instruction. The intrinsic is
explicitly opting-in to undefined behavior so a trap here for
out-of-bounds inputs on wasm should be acceptable.

cc #73591
2020-07-22 15:05:05 -07:00
..
backtrace@5965cf5fc1 update backtrace-rs 2020-07-20 16:44:46 +02:00
bootstrap Rollup merge of #73893 - ajpaverd:cfguard-stabilize, r=nikomatsakis 2020-07-22 09:29:03 -07:00
build_helper
ci ci: disable Azure Pipelines except for macOS 2020-07-22 11:00:56 +02:00
doc Rollup merge of #74589 - ehuss:update-books, r=ehuss 2020-07-22 09:29:15 -07:00
etc Rollup merge of #73715 - MaulingMonkey:pr-natvis-tuples, r=Amanieu 2020-07-11 08:53:13 -07:00
liballoc Auto merge of #74010 - pierwill:pierwill-o-notation, r=GuillaumeGomez 2020-07-20 10:19:58 +00:00
libcore Rollup merge of #74568 - aticu:master, r=Mark-Simulacrum 2020-07-22 09:29:11 -07:00
libpanic_abort Auto merge of #74395 - Mark-Simulacrum:stage0-next, r=pietroalbini 2020-07-17 03:51:35 +00:00
libpanic_unwind Auto merge of #74395 - Mark-Simulacrum:stage0-next, r=pietroalbini 2020-07-17 03:51:35 +00:00
libproc_macro Introduce restricted-std feature. 2020-07-15 09:57:05 -07:00
libprofiler_builtins Prepare for LLVM 11 2020-06-25 18:52:41 -07:00
librustc_apfloat Migrate to numeric associated consts 2020-06-10 01:35:47 +00:00
librustc_arena Rollup merge of #73378 - matthewjasper:arena-not-special, r=oli-obk 2020-06-20 14:45:00 -07:00
librustc_ast apply bootstrap cfgs 2020-07-16 19:36:49 -04:00
librustc_ast_lowering Suggest borrowing in more unsized fn param cases 2020-07-14 10:50:24 -07:00
librustc_ast_passes Revert "Remove spotlight usage" 2020-07-16 09:58:34 -07:00
librustc_ast_pretty Auto merge of #74175 - nnethercote:more-static-symbols, r=oli-obk 2020-07-15 00:16:25 +00:00
librustc_attr Add and use more static symbols. 2020-07-15 08:42:59 +10:00
librustc_builtin_macros Remove ExtCtxt::ident_of. 2020-07-17 08:28:19 +10:00
librustc_codegen_llvm Improve codegen for unchecked float casts on wasm 2020-07-22 15:05:05 -07:00
librustc_codegen_ssa Rollup merge of #73893 - ajpaverd:cfguard-stabilize, r=nikomatsakis 2020-07-22 09:29:03 -07:00
librustc_data_structures Auto merge of #69749 - davidtwco:issue-46477-polymorphization, r=eddyb 2020-07-21 03:09:04 +00:00
librustc_driver Auto merge of #72983 - Lezzz:rename-typeck, r=nikomatsakis 2020-07-17 17:25:09 +00:00
librustc_error_codes disallow non-static lifetimes in const generics 2020-07-19 12:52:36 -04:00
librustc_errors apply bootstrap cfgs 2020-07-16 19:36:49 -04:00
librustc_expand Remove ExtCtxt::ident_of. 2020-07-17 08:28:19 +10:00
librustc_feature mir: use attribute over -Z polymorphize-errors 2020-07-20 19:35:35 +01:00
librustc_fs_util
librustc_graphviz
librustc_hir Auto merge of #74091 - richkadel:llvm-coverage-map-gen-4, r=tmandry 2020-07-19 07:25:18 +00:00
librustc_hir_pretty Remove lots of Symbol::as_str() calls. 2020-07-15 09:01:35 +10:00
librustc_incremental Rename TypeckTables to TypeckResults. 2020-07-17 08:47:04 +00:00
librustc_index Auto merge of #69749 - davidtwco:issue-46477-polymorphization, r=eddyb 2020-07-21 03:09:04 +00:00
librustc_infer Auto merge of #72983 - Lezzz:rename-typeck, r=nikomatsakis 2020-07-17 17:25:09 +00:00
librustc_interface Rollup merge of #73893 - ajpaverd:cfguard-stabilize, r=nikomatsakis 2020-07-22 09:29:03 -07:00
librustc_lexer Rollup merge of #73856 - pierwill:pierwill-lexer-doc, r=jonas-schievink 2020-07-06 17:45:17 -07:00
librustc_lint Rollup merge of #74448 - davidtwco:improper-ctypes-definitions-boxes, r=davidtwco 2020-07-17 18:13:47 -07:00
librustc_llvm Generating the coverage map 2020-07-17 11:49:35 -07:00
librustc_macros Enforce the static symbol order. 2020-07-16 16:53:24 +10:00
librustc_metadata index: introduce and use FiniteBitSet 2020-07-20 19:35:37 +01:00
librustc_middle [AVR] Ensure that function pointers stored within aggregates are annotated with the correct space 2020-07-22 05:16:26 +12:00
librustc_mir index: introduce and use FiniteBitSet 2020-07-20 19:35:37 +01:00
librustc_mir_build Rollup merge of #74411 - jonas-schievink:unbreak-mir, r=matthewjasper 2020-07-17 14:09:22 -07:00
librustc_parse Rollup merge of #74337 - estebank:ty-parse-recovery, r=varkor 2020-07-15 11:01:26 -07:00
librustc_parse_format Eliminate confusing "globals" terminology. 2020-07-09 14:11:44 +10:00
librustc_passes Auto merge of #74091 - richkadel:llvm-coverage-map-gen-4, r=tmandry 2020-07-19 07:25:18 +00:00
librustc_plugin_impl rustc_metadata: Make crate loading fully speculative 2020-07-18 14:06:04 +04:00
librustc_privacy Auto merge of #72983 - Lezzz:rename-typeck, r=nikomatsakis 2020-07-17 17:25:09 +00:00
librustc_query_system apply bootstrap cfgs 2020-07-16 19:36:49 -04:00
librustc_resolve Rollup merge of #74557 - jakubadamw:issue-74539, r=nagisa 2020-07-20 12:30:32 -07:00
librustc_save_analysis Auto merge of #72983 - Lezzz:rename-typeck, r=nikomatsakis 2020-07-17 17:25:09 +00:00
librustc_serialize Use min_specialization in the remaining rustc crates 2020-06-10 09:05:52 +01:00
librustc_session Rollup merge of #73893 - ajpaverd:cfguard-stabilize, r=nikomatsakis 2020-07-22 09:29:03 -07:00
librustc_span mir: use attribute over -Z polymorphize-errors 2020-07-20 19:35:35 +01:00
librustc_symbol_mangling mir: unused_generic_params query 2020-07-20 19:35:30 +01:00
librustc_target [AVR] Ensure that function pointers stored within aggregates are annotated with the correct space 2020-07-22 05:16:26 +12:00
librustc_trait_selection Rollup merge of #74454 - lcnr:negative-impls, r=nikomatsakis 2020-07-22 09:29:07 -07:00
librustc_traits Use for<'tcx> fn pointers in Providers, instead of having Providers<'tcx>. 2020-07-05 23:00:14 +03:00
librustc_ty shim: adjust valid shim asserts 2020-07-20 11:23:32 +01:00
librustc_typeck Rollup merge of #73323 - davidtwco:issue-73252-wfcheck-foreign-fn-decl, r=ecstatic-morse 2020-07-20 12:30:16 -07:00
librustdoc Rollup merge of #74635 - GuillaumeGomez:fix-tooltip-pos, r=Manishearth 2020-07-22 09:29:17 -07:00
libstd Auto merge of #74075 - sunfishcode:wasi-prelude-rawfd, r=alexcrichton 2020-07-21 06:55:17 +00:00
libterm
libtest Rollup merge of #74033 - ehuss:std-compile-all-platforms, r=Mark-Simulacrum 2020-07-16 17:08:57 -07:00
libunwind Use an allow-list of platforms that support std. 2020-07-15 09:57:10 -07:00
llvm-project@86b120e6f3 Update llvm-project to latest origin/rustc/10.0-2020-05-05 commit which includes LVI segfault fix 2020-07-12 18:49:14 +00:00
rtstartup
rustc
rustllvm Generating the coverage map 2020-07-17 11:49:35 -07:00
stdarch@45340c0e2f
test Improve codegen for unchecked float casts on wasm 2020-07-22 15:05:05 -07:00
tools Rollup merge of #74237 - lzutao:compiletest, r=Mark-Simulacrum 2020-07-22 09:29:05 -07:00
README.md
stage0.txt Bump to 1.47 2020-07-16 19:36:49 -04:00

This directory contains the source code of the rust project, including:

  • rustc and its tests
  • libstd
  • Various submodules for tools, like rustdoc, rls, etc.

For more information on how various parts of the compiler work, see the rustc dev guide.