== floatformats_ieee_quad))
{
/* IEEE FLOAT128, args in vector registers. */
- ppc64_sysv_abi_push_val (gdbarch, val, TYPE_LENGTH (type), 0, argpos);
+ ppc64_sysv_abi_push_val (gdbarch, val, TYPE_LENGTH (type), 16, argpos);
ppc64_sysv_abi_push_vreg (gdbarch, val, argpos);
}
else if (type->code () == TYPE_CODE_FLT
}
else
{
- ppc64_sysv_abi_push_val (gdbarch, val, TYPE_LENGTH (type), 0, argpos);
+ /* Align == 0 is correct for ppc64_sysv_abi_push_freg,
+ Align == 16 is correct for ppc64_sysv_abi_push_vreg.
+ Default to 0. */
+ int align = 0;
/* The ABI (version 1.9) specifies that structs containing a
single floating-point value, at any level of nesting of
if (TYPE_LENGTH (type) == 16
&& (gdbarch_long_double_format (gdbarch)
== floatformats_ieee_quad))
- ppc64_sysv_abi_push_vreg (gdbarch, val, argpos);
+ {
+ ppc64_sysv_abi_push_vreg (gdbarch, val, argpos);
+ align = 16;
+ }
else
ppc64_sysv_abi_push_freg (gdbarch, type, val, argpos);
}
&& (gdbarch_long_double_format (gdbarch)
== floatformats_ieee_quad))
/* IEEE FLOAT128, args in vector registers. */
- ppc64_sysv_abi_push_vreg (gdbarch, elval, argpos);
-
+ {
+ ppc64_sysv_abi_push_vreg (gdbarch, elval, argpos);
+ align = 16;
+ }
else if (eltype->code () == TYPE_CODE_FLT
|| eltype->code () == TYPE_CODE_DECFLOAT)
/* IBM long double and all other floats and decfloats, args
&& eltype->is_vector ()
&& tdep->vector_abi == POWERPC_VEC_ALTIVEC
&& TYPE_LENGTH (eltype) == 16)
- ppc64_sysv_abi_push_vreg (gdbarch, elval, argpos);
+ {
+ ppc64_sysv_abi_push_vreg (gdbarch, elval, argpos);
+ align = 16;
+ }
}
}
+
+ ppc64_sysv_abi_push_val (gdbarch, val, TYPE_LENGTH (type), align, argpos);
}
}
long double _Complex ldc3 = 3.0L + 3.0Li;
long double _Complex ldc4 = 4.0L + 4.0Li;
+struct sldc
+{
+ long double _Complex ldc;
+};
+
+struct sldc sldc1 = { 1.0L + 1.0Li };
+struct sldc sldc2 = { 2.0L + 2.0Li };
+struct sldc sldc3 = { 3.0L + 3.0Li };
+struct sldc sldc4 = { 4.0L + 4.0Li };
+
#endif
int
}
+long double _Complex
+find_max_struct_long_double_real (int num_vals, ...)
+{
+ long double _Complex max = 0.0L + 0.0iL;
+ struct sldc x;
+ va_list argp;
+ int i;
+
+ va_start(argp, num_vals);
+ for (i = 0; i < num_vals; i++)
+ {
+ x = va_arg (argp, struct sldc);
+ if (creall (max) < creal (x.ldc)) max = x.ldc;
+ }
+
+ return max;
+}
+
#endif /* TEST_COMPLEX */