1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 20:51:52 +01:00

[SVE] Restore broken LLVM-C ABI compatability

Reviewers: deadalnix, efriedma, rengolin, jyknight, joerg

Reviewed By: joerg

Subscribers: tschuett, hiraditya, rkruppe, psnobl, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D79915
This commit is contained in:
Christopher Tetreault 2020-05-15 10:45:42 -07:00
parent 1d56552365
commit 7b3e2debb8
3 changed files with 21 additions and 21 deletions

View File

@ -144,24 +144,24 @@ typedef enum {
} LLVMOpcode; } LLVMOpcode;
typedef enum { typedef enum {
LLVMVoidTypeKind, /**< type with no size */ LLVMVoidTypeKind, /**< type with no size */
LLVMHalfTypeKind, /**< 16 bit floating point type */ LLVMHalfTypeKind, /**< 16 bit floating point type */
LLVMBFloatTypeKind, /**< 16 bit brain floating point type */ LLVMBFloatTypeKind, /**< 16 bit brain floating point type */
LLVMFloatTypeKind, /**< 32 bit floating point type */ LLVMFloatTypeKind, /**< 32 bit floating point type */
LLVMDoubleTypeKind, /**< 64 bit floating point type */ LLVMDoubleTypeKind, /**< 64 bit floating point type */
LLVMX86_FP80TypeKind, /**< 80 bit floating point type (X87) */ LLVMX86_FP80TypeKind, /**< 80 bit floating point type (X87) */
LLVMFP128TypeKind, /**< 128 bit floating point type (112-bit mantissa)*/ LLVMFP128TypeKind, /**< 128 bit floating point type (112-bit mantissa)*/
LLVMPPC_FP128TypeKind, /**< 128 bit floating point type (two 64-bits) */ LLVMPPC_FP128TypeKind, /**< 128 bit floating point type (two 64-bits) */
LLVMLabelTypeKind, /**< Labels */ LLVMLabelTypeKind, /**< Labels */
LLVMIntegerTypeKind, /**< Arbitrary bit width integers */ LLVMIntegerTypeKind, /**< Arbitrary bit width integers */
LLVMFunctionTypeKind, /**< Functions */ LLVMFunctionTypeKind, /**< Functions */
LLVMStructTypeKind, /**< Structures */ LLVMStructTypeKind, /**< Structures */
LLVMArrayTypeKind, /**< Arrays */ LLVMArrayTypeKind, /**< Arrays */
LLVMPointerTypeKind, /**< Pointers */ LLVMPointerTypeKind, /**< Pointers */
LLVMMetadataTypeKind, /**< Metadata */ LLVMVectorTypeKind, /**< Fixed width SIMD vector type */
LLVMX86_MMXTypeKind, /**< X86 MMX */ LLVMMetadataTypeKind, /**< Metadata */
LLVMTokenTypeKind, /**< Tokens */ LLVMX86_MMXTypeKind, /**< X86 MMX */
LLVMFixedVectorTypeKind, /**< Fixed width SIMD vector type */ LLVMTokenTypeKind, /**< Tokens */
LLVMScalableVectorTypeKind /**< Scalable SIMD vector type */ LLVMScalableVectorTypeKind /**< Scalable SIMD vector type */
} LLVMTypeKind; } LLVMTypeKind;

View File

@ -503,12 +503,12 @@ LLVMTypeKind LLVMGetTypeKind(LLVMTypeRef Ty) {
return LLVMArrayTypeKind; return LLVMArrayTypeKind;
case Type::PointerTyID: case Type::PointerTyID:
return LLVMPointerTypeKind; return LLVMPointerTypeKind;
case Type::FixedVectorTyID:
return LLVMVectorTypeKind;
case Type::X86_MMXTyID: case Type::X86_MMXTyID:
return LLVMX86_MMXTypeKind; return LLVMX86_MMXTypeKind;
case Type::TokenTyID: case Type::TokenTyID:
return LLVMTokenTypeKind; return LLVMTokenTypeKind;
case Type::FixedVectorTyID:
return LLVMFixedVectorTypeKind;
case Type::ScalableVectorTyID: case Type::ScalableVectorTyID:
return LLVMScalableVectorTypeKind; return LLVMScalableVectorTypeKind;
} }

View File

@ -142,7 +142,7 @@ struct TypeCloner {
case LLVMScalableVectorTypeKind: case LLVMScalableVectorTypeKind:
// FIXME: scalable vectors unsupported // FIXME: scalable vectors unsupported
break; break;
case LLVMFixedVectorTypeKind: case LLVMVectorTypeKind:
return LLVMVectorType( return LLVMVectorType(
Clone(LLVMGetElementType(Src)), Clone(LLVMGetElementType(Src)),
LLVMGetVectorSize(Src) LLVMGetVectorSize(Src)