rust/src/librustc_codegen_llvm
Mazdak Farrokhzad eb30d56d37
Rollup merge of #56599 - dlrobertson:fix_va_arg, r=eddyb
codegen: Fix va_list - aarch64 iOS/Windows

## Summary

Fix code generated for `VaList` on Aarch64 iOS/Windows.

## Details

According to the [Apple - ARM64 Function Calling Conventions]:

> ... the type va_list is an alias for char * rather than for the struct
> type specified in the generic PCS.

The current implementation uses the generic Aarch64 structure for `VaList`
for Aarch64 iOS. Switch to using the `char *` variant of the `VaList`
and use the corresponding `emit_ptr_va_arg` for the `va_arg` intrinsic.

Windows always uses the `char *` variant of the `VaList`. Update the `va_arg`
intrinsic to use `emit_ptr_va_arg`.

[Apple - ARM64 Function Calling Conventions]: https://developer.apple.com/library/archive/documentation/Xcode/Conceptual/iPhoneOSABIReference/Articles/ARM64FunctionCallingConventions.html
2018-12-08 08:43:47 +01:00
..
back Various minor/cosmetic improvements to code 2018-12-07 23:53:34 +00:00
debuginfo Various minor/cosmetic improvements to code 2018-12-07 23:53:34 +00:00
llvm Various minor/cosmetic improvements to code 2018-12-07 23:53:34 +00:00
abi.rs Various minor/cosmetic improvements to code 2018-12-07 23:53:34 +00:00
allocator.rs codegen_llvm: improve allocations 2018-10-08 16:55:04 +02:00
asm.rs Use implicit deref instead of BuilderMethods::cx() 2018-11-29 18:19:44 +01:00
attributes.rs Various minor/cosmetic improvements to code 2018-12-07 23:53:34 +00:00
base.rs Remove static_replace_all_uses and statics_to_rauw from cg_ssa 2018-11-29 18:19:41 +01:00
build.rs Rename trans to codegen everywhere. 2018-05-17 15:08:30 +03:00
builder.rs Move get_static from CodegenCx to Builder 2018-11-29 18:19:44 +01:00
callee.rs Rename StaticMethods::static_ptrcast to ConstMethods::const_ptrcast 2018-11-29 18:19:43 +01:00
Cargo.toml Add rustc_codegen_ssa to sysroot 2018-11-22 20:20:23 +01:00
common.rs Various minor/cosmetic improvements to code 2018-12-07 23:53:34 +00:00
consts.rs Various minor/cosmetic improvements to code 2018-12-07 23:53:34 +00:00
context.rs Various minor/cosmetic improvements to code 2018-12-07 23:53:34 +00:00
declare.rs [eddyb] rustc_codegen_ssa: rename interfaces to traits. 2018-11-16 15:08:18 +02:00
diagnostics.rs Great separation of librustc_codegen_llvm: librustc_codegen_ssa compiles 2018-11-16 15:07:24 +02:00
intrinsic.rs Various minor/cosmetic improvements to code 2018-12-07 23:53:34 +00:00
lib.rs Serialize modules into ThinBuffer after initial optimization 2018-12-04 16:24:20 +01:00
llvm_util.rs Enable -mergefunc-use-aliases 2018-11-30 00:52:16 +01:00
metadata.rs Rename conversion util; remove duplicate util in librustc_codegen_llvm. 2018-11-29 08:09:28 -05:00
mono_item.rs Various minor/cosmetic improvements to code 2018-12-07 23:53:34 +00:00
README.md rustc-guide has moved 2018-11-26 15:03:13 -06:00
type_.rs Various minor/cosmetic improvements to code 2018-12-07 23:53:34 +00:00
type_of.rs Various minor/cosmetic improvements to code 2018-12-07 23:53:34 +00:00
va_arg.rs codegen: Fix va_list - aaarch64 iOS/Windows 2018-12-07 22:54:56 +00:00
value.rs Removed genericity over Value in various functions 2018-11-16 14:11:34 +02:00

The codegen crate contains the code to convert from MIR into LLVM IR, and then from LLVM IR into machine code. In general it contains code that runs towards the end of the compilation process.

For more information about how codegen works, see the rustc guide.