diff --git a/src/arch/arm/aapcs64.hh b/src/arch/arm/aapcs64.hh index 203846d43c..30597f59e3 100644 --- a/src/arch/arm/aapcs64.hh +++ b/src/arch/arm/aapcs64.hh @@ -70,24 +70,17 @@ namespace GuestABI // A short vector is a machine type that is composed of repeated instances of // one fundamental integral or floating- point type. It may be 8 or 16 bytes -// in total size. We represent it here as an opaque blob of data with an -// appropriate alignment requirement. +// in total size. -template -using Aapcs64ShortVectorCandidate = - alignas(sizeof(T) * count) uint8_t [sizeof(T) * count]; - -template -using Aapcs64ShortVector = Aapcs64ShortVectorCandidate::value || std::is_floating_point::value) && - (sizeof(T) * count == 8 || sizeof(T) * count == 16)>::type>; - -template +template struct IsAapcs64ShortVector : public std::false_type {}; template -struct IsAapcs64ShortVector> : public std::true_type +struct IsAapcs64ShortVector::value || std::is_floating_point::value) && + (sizeof(E) * N == 8 || sizeof(E) * N == 16)>::type> : + public std::true_type {}; /* @@ -114,38 +107,31 @@ struct IsAapcs64Composite -using Aapcs64HomogeneousAggregate = T[count]; - // An Homogeneous Floating-Point Aggregate (HFA) is an Homogeneous Aggregate // with a Fundemental Data Type that is a Floating-Point type and at most four // uniquely addressable members. -template -using Aapcs64Hfa = Aapcs64HomogeneousAggregate::value && - count <= 4>::type>; - template struct IsAapcs64Hfa : public std::false_type {}; template -struct IsAapcs64Hfa> : public std::true_type {}; +struct IsAapcs64Hfa::value && + N <= 4>::type> : public std::true_type +{}; // An Homogeneous Short-Vector Aggregate (HVA) is an Homogeneous Aggregate with // a Fundamental Data Type that is a Short-Vector type and at most four // uniquely addressable members. -template -using Aapcs64Hva = Aapcs64HomogeneousAggregate::value && - count <= 4>::type>; - template struct IsAapcs64Hva : public std::false_type {}; template -struct IsAapcs64Hva> : public std::true_type {}; +struct IsAapcs64Hva::value && + N <= 4>::type> : public std::true_type +{}; // A shorthand to test if a type is an HVA or an HFA. template @@ -153,7 +139,7 @@ struct IsAapcs64Hxa : public std::false_type {}; template struct IsAapcs64Hxa::value && IsAapcs64Hva::value>::type> : + IsAapcs64Hfa::value || IsAapcs64Hva::value>::type> : public std::true_type {};