about summary refs log tree commit diff
path: root/compiler/rustc_query_impl/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-07-17 10:15:33 +0000
committerbors <bors@rust-lang.org>2021-07-17 10:15:33 +0000
commit64d171b8a419eb6cb872ab579398eff8a741bbc6 (patch)
tree7fdbd2d800f5d4109d388ba4ddc1429c9235cc2f /compiler/rustc_query_impl/src
parent153df0f6ef0f3ff00b12122774825507fd88169f (diff)
parentdb1e49257e84f065bf14d547c36cb76178b03971 (diff)
downloadrust-64d171b8a419eb6cb872ab579398eff8a741bbc6.tar.gz
rust-64d171b8a419eb6cb872ab579398eff8a741bbc6.zip
Auto merge of #87124 - Andy-Python-Programmer:code_model_uefi_patch, r=petrochenkov
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.

Signed-off-by: Andy-Python-Programmer <andypythonappdeveloper@gmail.com>
Diffstat (limited to 'compiler/rustc_query_impl/src')
0 files changed, 0 insertions, 0 deletions