File tree Expand file tree Collapse file tree 1 file changed +16
-4
lines changed
compiler/rustc_codegen_llvm/src Expand file tree Collapse file tree 1 file changed +16
-4
lines changed Original file line number Diff line number Diff line change @@ -1169,14 +1169,26 @@ pub(super) fn emit_va_arg<'ll, 'tcx>(
11691169 AllowHigherAlign :: Yes ,
11701170 ForceRightAdjust :: No ,
11711171 ) ,
1172+ Arch :: Mips | Arch :: Mips32r6 | Arch :: Mips64 | Arch :: Mips64r6 => emit_ptr_va_arg (
1173+ bx,
1174+ addr,
1175+ target_ty,
1176+ PassMode :: Direct ,
1177+ if target. llvm_abiname . starts_with ( "n32" ) || target. llvm_abiname . starts_with ( "n64" ) {
1178+ SlotSize :: Bytes8
1179+ } else {
1180+ SlotSize :: Bytes4
1181+ } ,
1182+ AllowHigherAlign :: Yes ,
1183+ match bx. tcx ( ) . sess . target . endian {
1184+ Endian :: Big => ForceRightAdjust :: Yes ,
1185+ Endian :: Little => ForceRightAdjust :: No ,
1186+ } ,
1187+ ) ,
11721188
11731189 Arch :: Bpf => bug ! ( "bpf does not support c-variadic functions" ) ,
11741190 Arch :: SpirV => bug ! ( "spirv does not support c-variadic functions" ) ,
11751191
1176- Arch :: Mips | Arch :: Mips32r6 | Arch :: Mips64 | Arch :: Mips64r6 => {
1177- // FIXME: port MipsTargetLowering::lowerVAARG.
1178- bx. va_arg ( addr. immediate ( ) , bx. cx . layout_of ( target_ty) . llvm_type ( bx. cx ) )
1179- }
11801192 Arch :: Sparc | Arch :: Avr | Arch :: M68k | Arch :: Msp430 => {
11811193 // Clang uses the LLVM implementation for these architectures.
11821194 bx. va_arg ( addr. immediate ( ) , bx. cx . layout_of ( target_ty) . llvm_type ( bx. cx ) )
You can’t perform that action at this time.
0 commit comments