authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2018-09-19 17:52:37-04:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2018-09-19 17:52:37-04:00
logce912e29640e0a3b39a5c304c86bdbb5fff67169
treee1c56ca53be2a2765f8edbec1bf1395de03d3253
parenta4d61b5d72750a11d8294986939b433070f3d1ff

add HermitCore target


3 files changed, 10 insertions(+), 1 deletions(-)

src/target.cpp+7
...@@ -159,6 +159,7 @@ static const Os os_list[] = {...@@ -159,6 +159,7 @@ static const Os os_list[] = {
159 OsMesa3D,159 OsMesa3D,
160 OsContiki,160 OsContiki,
161 OsAMDPAL,161 OsAMDPAL,
162 OsHermitCore,
162 OsZen,163 OsZen,
163};164};
164165
...@@ -301,6 +302,8 @@ static ZigLLVM_OSType get_llvm_os_type(Os os_type) {...@@ -301,6 +302,8 @@ static ZigLLVM_OSType get_llvm_os_type(Os os_type) {
301 return ZigLLVM_Contiki;302 return ZigLLVM_Contiki;
302 case OsAMDPAL:303 case OsAMDPAL:
303 return ZigLLVM_AMDPAL;304 return ZigLLVM_AMDPAL;
305 case OsHermitCore:
306 return ZigLLVM_HermitCore;
304 }307 }
305 zig_unreachable();308 zig_unreachable();
306}309}
...@@ -370,6 +373,8 @@ static Os get_zig_os_type(ZigLLVM_OSType os_type) {...@@ -370,6 +373,8 @@ static Os get_zig_os_type(ZigLLVM_OSType os_type) {
370 return OsContiki;373 return OsContiki;
371 case ZigLLVM_AMDPAL:374 case ZigLLVM_AMDPAL:
372 return OsAMDPAL;375 return OsAMDPAL;
376 case ZigLLVM_HermitCore:
377 return OsHermitCore;
373 }378 }
374 zig_unreachable();379 zig_unreachable();
375}380}
...@@ -410,6 +415,7 @@ const char *get_target_os_name(Os os_type) {...@@ -410,6 +415,7 @@ const char *get_target_os_name(Os os_type) {
410 case OsMesa3D:415 case OsMesa3D:
411 case OsContiki:416 case OsContiki:
412 case OsAMDPAL:417 case OsAMDPAL:
418 case OsHermitCore:
413 return ZigLLVMGetOSTypeName(get_llvm_os_type(os_type));419 return ZigLLVMGetOSTypeName(get_llvm_os_type(os_type));
414 }420 }
415 zig_unreachable();421 zig_unreachable();
...@@ -783,6 +789,7 @@ uint32_t target_c_type_size_in_bits(const ZigTarget *target, CIntType id) {...@@ -783,6 +789,7 @@ uint32_t target_c_type_size_in_bits(const ZigTarget *target, CIntType id) {
783 case OsFuchsia:789 case OsFuchsia:
784 case OsContiki:790 case OsContiki:
785 case OsAMDPAL:791 case OsAMDPAL:
792 case OsHermitCore:
786 zig_panic("TODO c type size in bits for this target");793 zig_panic("TODO c type size in bits for this target");
787 }794 }
788 zig_unreachable();795 zig_unreachable();
src/target.hpp+1
...@@ -50,6 +50,7 @@ enum Os {...@@ -50,6 +50,7 @@ enum Os {
50 OsMesa3D,50 OsMesa3D,
51 OsContiki,51 OsContiki,
52 OsAMDPAL,52 OsAMDPAL,
53 OsHermitCore,
53 OsZen,54 OsZen,
54};55};
5556
src/zig_llvm.h+2-1
...@@ -357,8 +357,9 @@ enum ZigLLVM_OSType {...@@ -357,8 +357,9 @@ enum ZigLLVM_OSType {
357 ZigLLVM_Mesa3D,357 ZigLLVM_Mesa3D,
358 ZigLLVM_Contiki,358 ZigLLVM_Contiki,
359 ZigLLVM_AMDPAL, // AMD PAL Runtime359 ZigLLVM_AMDPAL, // AMD PAL Runtime
360 ZigLLVM_HermitCore, // HermitCore Unikernel/Multikernel
360361
361 ZigLLVM_LastOSType = ZigLLVM_AMDPAL362 ZigLLVM_LastOSType = ZigLLVM_HermitCore
362};363};
363364
364// Synchronize with target.cpp::environ_list365// Synchronize with target.cpp::environ_list