From a168893e0097093665154c7897b7f909cec855a1 Mon Sep 17 00:00:00 2001 From: Cody Tapscott Date: Fri, 14 Oct 2022 12:58:37 -0700 Subject: [PATCH] stage1: Fix ppcle `long double` size Resolves #13110 --- src/stage1/codegen.cpp | 1 + src/stage1/target.cpp | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/stage1/codegen.cpp b/src/stage1/codegen.cpp index 48f9d20ec4..e5c694967c 100644 --- a/src/stage1/codegen.cpp +++ b/src/stage1/codegen.cpp @@ -9936,6 +9936,7 @@ static void define_builtin_types(CodeGen *g) { add_fp_entry(g, "c_longdouble", 128, LLVMFP128Type(), &g->builtin_types.entry_c_longdouble); break; case ZigLLVM_ppc: + case ZigLLVM_ppcle: case ZigLLVM_ppc64: case ZigLLVM_ppc64le: add_fp_entry(g, "c_longdouble", 128, LLVMFP128Type(), &g->builtin_types.entry_c_longdouble); diff --git a/src/stage1/target.cpp b/src/stage1/target.cpp index 3031b7e588..dfd91bed8a 100644 --- a/src/stage1/target.cpp +++ b/src/stage1/target.cpp @@ -950,7 +950,6 @@ bool target_is_arm(const ZigTarget *target) { case ZigLLVM_msp430: case ZigLLVM_nvptx: case ZigLLVM_nvptx64: - case ZigLLVM_ppc64le: case ZigLLVM_r600: case ZigLLVM_renderscript32: case ZigLLVM_renderscript64: @@ -971,6 +970,7 @@ bool target_is_arm(const ZigTarget *target) { case ZigLLVM_ppc: case ZigLLVM_ppcle: case ZigLLVM_ppc64: + case ZigLLVM_ppc64le: case ZigLLVM_ve: case ZigLLVM_spirv32: case ZigLLVM_spirv64: @@ -1125,8 +1125,8 @@ bool target_is_mips(const ZigTarget *target) { } bool target_is_ppc(const ZigTarget *target) { - return target->arch == ZigLLVM_ppc || target->arch == ZigLLVM_ppc64 || - target->arch == ZigLLVM_ppc64le; + return target->arch == ZigLLVM_ppc || target->arch == ZigLLVM_ppcle || + target->arch == ZigLLVM_ppc64 || target->arch == ZigLLVM_ppc64le; } // Returns the minimum alignment for every function pointer on the given