@@ -10395,7 +10395,12 @@ fn firstParamSRet(fn_info: Type.Payload.Function.Data, target: std.Target) bool
1039510395 .mips , .mipsel = > return false ,
1039610396 .x86_64 = > switch (target .os .tag ) {
1039710397 .windows = > return x86_64_abi .classifyWindows (fn_info .return_type , target ) == .memory ,
10398- else = > return x86_64_abi .classifySystemV (fn_info .return_type , target , .ret )[0 ] == .memory ,
10398+ else = > {
10399+ const class = x86_64_abi .classifySystemV (fn_info .return_type , target , .ret );
10400+ if (class [0 ] == .memory ) return true ;
10401+ if (class [0 ] == .x87 and class [2 ] != .none ) return true ;
10402+ return false ;
10403+ },
1039910404 },
1040010405 .wasm32 = > return wasm_c_abi .classifyType (fn_info .return_type , target )[0 ] == .indirect ,
1040110406 .aarch64 , .aarch64_be = > return aarch64_c_abi .classifyType (fn_info .return_type , target ) == .memory ,
@@ -10469,22 +10474,26 @@ fn lowerFnRetTy(dg: *DeclGen, fn_info: Type.Payload.Function.Data) !*llvm.Type {
1046910474 llvm_types_buffer [llvm_types_index ] = dg .context .intType (64 );
1047010475 llvm_types_index += 1 ;
1047110476 },
10472- .sse = > {
10477+ .sse , .sseup = > {
1047310478 llvm_types_buffer [llvm_types_index ] = dg .context .doubleType ();
1047410479 llvm_types_index += 1 ;
1047510480 },
10476- .sseup = > {
10477- llvm_types_buffer [llvm_types_index ] = dg .context .doubleType ();
10481+ .float = > {
10482+ llvm_types_buffer [llvm_types_index ] = dg .context .floatType ();
1047810483 llvm_types_index += 1 ;
1047910484 },
10480- .x87 = > {
10481- llvm_types_buffer [llvm_types_index ] = dg .context .x86FP80Type ( );
10485+ .float_combine = > {
10486+ llvm_types_buffer [llvm_types_index ] = dg .context .floatType (). vectorType ( 2 );
1048210487 llvm_types_index += 1 ;
1048310488 },
10484- .x87up = > {
10489+ .x87 = > {
10490+ if (llvm_types_index != 0 or classes [2 ] != .none ) {
10491+ return dg .context .voidType ();
10492+ }
1048510493 llvm_types_buffer [llvm_types_index ] = dg .context .x86FP80Type ();
1048610494 llvm_types_index += 1 ;
1048710495 },
10496+ .x87up = > continue ,
1048810497 .complex_x87 = > {
1048910498 @panic ("TODO" );
1049010499 },
@@ -10689,22 +10698,25 @@ const ParamTypeIterator = struct {
1068910698 llvm_types_buffer [llvm_types_index ] = dg .context .intType (64 );
1069010699 llvm_types_index += 1 ;
1069110700 },
10692- .sse = > {
10701+ .sse , .sseup = > {
1069310702 llvm_types_buffer [llvm_types_index ] = dg .context .doubleType ();
1069410703 llvm_types_index += 1 ;
1069510704 },
10696- .sseup = > {
10697- llvm_types_buffer [llvm_types_index ] = dg .context .doubleType ();
10705+ .float = > {
10706+ llvm_types_buffer [llvm_types_index ] = dg .context .floatType ();
1069810707 llvm_types_index += 1 ;
1069910708 },
10700- .x87 = > {
10701- llvm_types_buffer [llvm_types_index ] = dg .context .x86FP80Type ( );
10709+ .float_combine = > {
10710+ llvm_types_buffer [llvm_types_index ] = dg .context .floatType (). vectorType ( 2 );
1070210711 llvm_types_index += 1 ;
1070310712 },
10704- .x87up = > {
10705- llvm_types_buffer [llvm_types_index ] = dg .context .x86FP80Type ();
10706- llvm_types_index += 1 ;
10713+ .x87 = > {
10714+ it .zig_index += 1 ;
10715+ it .llvm_index += 1 ;
10716+ it .byval_attr = true ;
10717+ return .byref ;
1070710718 },
10719+ .x87up = > unreachable ,
1070810720 .complex_x87 = > {
1070910721 @panic ("TODO" );
1071010722 },
0 commit comments