os-rust/compiler
Andy-Python-Programmer db1e49257e
Use small code model for UEFI targets
* Since the code model only applies to the code and not the data and the code model
only applies to functions you call through using `call`, `jmp` and data with `lea`, etc…

If you are calling functions using the function pointers from the UEFI structures the code
model does not apply in that case. It’s just related to the address space size of your own binary.
Since UEFI (uefi is all relocatable) uses relocatable PEs (relocatable code does not care about the
code model) so, we use the small code model here.

* Since applications don't usually take gigabytes of memory, setting the
target to use the small code model should result in better codegen (comparable
with majority of other targets).

Large code models are also known for generating horrible code, for
example 16 bytes of code to load a single 8-byte value.

* Use the LLVM default code model for the architecture for the
x86_64-unknown-uefi targets. For reference small is the default
code model on x86 in LLVM: <7de2173c2a/llvm/lib/Target/X86/X86TargetMachine.cpp (L204)>

* Remove the comments too as they are not UEFI-specific and applies
to pretty much any target. I added them before as I was explicitily
setting the code model to small.

Signed-off-by: Andy-Python-Programmer <andypythonappdeveloper@gmail.com>
2021-07-17 14:08:40 +10:00
..
rustc use jemallocator in rustc/rustdoc 2021-04-04 14:10:26 -07:00
rustc_apfloat Use HTTPS links where possible 2021-06-23 16:26:46 -04:00
rustc_arena Remove (lots of) dead code 2021-03-27 22:16:33 -04:00
rustc_ast Auto merge of #83918 - workingjubilee:stable-rangefrom-pat, r=joshtriplett 2021-07-11 06:31:42 +00:00
rustc_ast_lowering Cache expansion hash. 2021-07-13 23:10:56 +02:00
rustc_ast_passes Auto merge of #83918 - workingjubilee:stable-rangefrom-pat, r=joshtriplett 2021-07-11 06:31:42 +00:00
rustc_ast_pretty Rework SESSION_GLOBALS API to prevent overwriting it 2021-07-08 16:16:28 +02:00
rustc_attr Enhance well-formedness checks for #[repr(...)] attributes 2021-07-09 22:03:48 +02:00
rustc_builtin_macros rustc_expand: Remove redundant field from proc macro expander structures 2021-07-10 23:22:27 +03:00
rustc_codegen_cranelift Use cranelift's Type::int instead of doing the match myself 2021-07-08 14:55:58 -07:00
rustc_codegen_llvm Auto merge of #86416 - Amanieu:asm_clobber_only, r=nagisa 2021-07-11 01:06:58 +00:00
rustc_codegen_ssa Auto merge of #86873 - nikic:opaque-ptrs, r=nagisa 2021-07-10 19:01:41 +00:00
rustc_data_structures rustc_data_structures: Drop unused dependency on crossbeam-utils 2021-06-25 01:03:16 -07:00
rustc_driver Auto merge of #80182 - in42:stack_trace, r=tmandry 2021-07-02 05:40:51 +00:00
rustc_error_codes Rollup merge of #86838 - lambinoo:I-69630-rust_const_unstable_check_const, r=oli-obk 2021-07-08 18:30:34 +02:00
rustc_errors Simplify future incompatible reporting. 2021-07-11 13:08:58 -07:00
rustc_expand Cache expansion hash. 2021-07-13 23:10:56 +02:00
rustc_feature Auto merge of #86922 - joshtriplett:target-abi, r=oli-obk 2021-07-13 12:25:10 +00:00
rustc_fs_util Optimize away a fs::metadata call. 2021-01-06 08:33:15 -08:00
rustc_graphviz Use HTTPS links where possible 2021-06-23 16:26:46 -04:00
rustc_hir Auto merge of #85941 - cjgillot:qresolve, r=Aaron1011 2021-07-11 16:09:17 +00:00
rustc_hir_pretty Rollup merge of #86358 - klensy:pp-loop, r=Mark-Simulacrum 2021-06-29 00:26:55 +09:00
rustc_incremental Revert "Revert "Merge CrateDisambiguator into StableCrateId"" 2021-07-06 11:28:04 +02:00
rustc_index Remove unused feature gates 2021-05-31 13:55:43 +02:00
rustc_infer remove unused Option 2021-07-04 11:09:32 -04:00
rustc_interface Rework SESSION_GLOBALS API to prevent overwriting it 2021-07-08 16:16:28 +02:00
rustc_lexer Rename 'bad prefix' to 'unknown prefix'. 2021-06-26 23:11:14 +08:00
rustc_lint Auto merge of #86827 - camsteffen:hash-lint-resolved, r=oli-obk 2021-07-13 15:06:10 +00:00
rustc_lint_defs Simplify future incompatible reporting. 2021-07-11 13:08:58 -07:00
rustc_llvm Pass type when creating atomic load 2021-07-09 22:00:19 +02:00
rustc_macros Fix default_hash_types to use resolved path 2021-07-09 09:10:45 -05:00
rustc_metadata Auto merge of #87044 - cjgillot:expnhash, r=petrochenkov 2021-07-13 22:32:58 +00:00
rustc_middle Auto merge of #87044 - cjgillot:expnhash, r=petrochenkov 2021-07-13 22:32:58 +00:00
rustc_mir Auto merge of #87044 - cjgillot:expnhash, r=petrochenkov 2021-07-13 22:32:58 +00:00
rustc_mir_build Auto merge of #86665 - FabianWolff:layout-field-thir-unsafeck, r=oli-obk 2021-07-13 04:38:39 +00:00
rustc_parse Auto merge of #83918 - workingjubilee:stable-rangefrom-pat, r=joshtriplett 2021-07-11 06:31:42 +00:00
rustc_parse_format Rework SESSION_GLOBALS API to prevent overwriting it 2021-07-08 16:16:28 +02:00
rustc_passes Auto merge of #86857 - fee1-dead:add-attr, r=oli-obk 2021-07-13 06:59:34 +00:00
rustc_plugin_impl Use () for plugin_registrar_fn. 2021-05-12 13:58:43 +02:00
rustc_privacy Make resolutions a query. 2021-07-06 19:22:27 +02:00
rustc_query_impl Correct comments about untracked accesses. 2021-07-06 19:26:02 +02:00
rustc_query_system Auto merge of #85154 - cjgillot:lessfn, r=bjorn3 2021-06-15 14:52:58 +00:00
rustc_resolve Cache expansion hash. 2021-07-13 23:10:56 +02:00
rustc_save_analysis rustc_span: Revert addition of proc_macro field to ExpnKind::Macro 2021-07-10 23:03:35 +03:00
rustc_serialize Emit warnings for unused fields in custom targets. 2021-06-17 21:48:02 +02:00
rustc_session Auto merge of #86922 - joshtriplett:target-abi, r=oli-obk 2021-07-13 12:25:10 +00:00
rustc_span Auto merge of #87106 - Mark-Simulacrum:edition-no-clone, r=petrochenkov 2021-07-14 01:41:12 +00:00
rustc_symbol_mangling Revert "Revert "Merge CrateDisambiguator into StableCrateId"" 2021-07-06 11:28:04 +02:00
rustc_target Use small code model for UEFI targets 2021-07-17 14:08:40 +10:00
rustc_trait_selection Rollup merge of #86726 - sexxi-goose:use-diagnostic-item-for-rfc2229-migration, r=nikomatsakis 2021-07-08 18:30:33 +02:00
rustc_traits Combine individual limit queries into single limits query 2021-07-04 13:02:51 -05:00
rustc_ty_utils Add impl_constness query 2021-07-10 20:54:49 +08:00
rustc_type_ir Remove unused feature gates 2021-05-31 13:55:43 +02:00
rustc_typeck Auto merge of #86249 - FabianWolff:issue-86238, r=varkor 2021-07-11 22:39:16 +00:00