authorgravatar for ziga.zeljko@gmail.comŽiga Željko <ziga.zeljko@gmail.com> 2021-11-09 20:15:39+01:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2021-11-09 16:43:03-05:00
logb24e4757176b0f0b110b6f726d92bbfb820924e3
tree650d936e64202a3bb4d97dba44f6e9bc7b8ac5ad
parentd2cdfb949033cfd463cdd4ef1bbf93f94d4d190a

stage1: fix type mapping for integers and c_longdouble on nvptx


2 files changed, 6 insertions(+), 2 deletions(-)

src/stage1/codegen.cpp+4
...@@ -8901,6 +8901,10 @@ static void define_builtin_types(CodeGen *g) {...@@ -8901,6 +8901,10 @@ static void define_builtin_types(CodeGen *g) {
8901 case ZigLLVM_bpfeb:8901 case ZigLLVM_bpfeb:
8902 add_fp_entry(g, "c_longdouble", 64, LLVMDoubleType(), &g->builtin_types.entry_c_longdouble);8902 add_fp_entry(g, "c_longdouble", 64, LLVMDoubleType(), &g->builtin_types.entry_c_longdouble);
8903 break;8903 break;
8904 case ZigLLVM_nvptx:
8905 case ZigLLVM_nvptx64:
8906 add_fp_entry(g, "c_longdouble", 64, LLVMDoubleType(), &g->builtin_types.entry_c_longdouble);
8907 break;
8904 default:8908 default:
8905 zig_panic("TODO implement mapping for c_longdouble");8909 zig_panic("TODO implement mapping for c_longdouble");
8906 }8910 }
src/stage1/target.cpp+2-2
...@@ -680,6 +680,8 @@ uint32_t target_c_type_size_in_bits(const ZigTarget *target, CIntType id) {...@@ -680,6 +680,8 @@ uint32_t target_c_type_size_in_bits(const ZigTarget *target, CIntType id) {
680 case OsSolaris:680 case OsSolaris:
681 case OsEmscripten:681 case OsEmscripten:
682 case OsPlan9:682 case OsPlan9:
683 case OsCUDA:
684 case OsNVCL:
683 switch (id) {685 switch (id) {
684 case CIntTypeShort:686 case CIntTypeShort:
685 case CIntTypeUShort:687 case CIntTypeUShort:
...@@ -741,8 +743,6 @@ uint32_t target_c_type_size_in_bits(const ZigTarget *target, CIntType id) {...@@ -741,8 +743,6 @@ uint32_t target_c_type_size_in_bits(const ZigTarget *target, CIntType id) {
741 case OsRTEMS:743 case OsRTEMS:
742 case OsNaCl:744 case OsNaCl:
743 case OsAIX:745 case OsAIX:
744 case OsCUDA:
745 case OsNVCL:
746 case OsAMDHSA:746 case OsAMDHSA:
747 case OsPS4:747 case OsPS4:
748 case OsELFIAMCU:748 case OsELFIAMCU: