diff options
-rw-r--r-- | CHANGELOG.txt | 15 | ||||
-rw-r--r-- | FEATURE-WISHLIST.txt | 37 | ||||
-rw-r--r-- | README.txt | 19 | ||||
-rw-r--r-- | zp/include/zp/bs | 4 | ||||
-rw-r--r-- | zp/include/zp/bs.d/syscl.ii | 2 | ||||
-rw-r--r-- | zp/include/zp/bs.h | 59 | ||||
-rw-r--r-- | zp/include/zp/mem | 6 | ||||
-rw-r--r-- | zp/include/zp/mem.d/cpy.ii | 4 | ||||
-rw-r--r-- | zp/include/zp/mem.d/memcpy.ii | 6 | ||||
-rw-r--r-- | zp/include/zp/mem.h | 4 | ||||
-rw-r--r-- | zp/include/zp/priv/arc.h (renamed from zp/include/zp/priv/arch.h) | 8 | ||||
-rw-r--r-- | zp/include/zp/priv/chr.h | 12 | ||||
-rw-r--r-- | zp/include/zp/priv/flt.h | 12 | ||||
-rw-r--r-- | zp/include/zp/priv/imp.h (renamed from zp/include/zp/priv/impl.h) | 20 | ||||
-rw-r--r-- | zp/include/zp/priv/int.h | 22 | ||||
-rw-r--r-- | zp/include/zp/priv/sys.h (renamed from zp/include/zp/priv/os.h) | 62 | ||||
-rw-r--r-- | zp/source/amd64/mem/memcpy.s | 2 | ||||
-rw-r--r-- | zp/source/any/bs/syscl.c | 2 | ||||
-rw-r--r-- | zp/source/any/mem/memcpy.cc | 4 |
19 files changed, 160 insertions, 140 deletions
diff --git a/CHANGELOG.txt b/CHANGELOG.txt index d780b2b..58d0d7e 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,4 +1,4 @@ -# 0.1.0 +# 1.0.0 * Update API-BREAK file; * Don't call run-time functions from translation-time functions; @@ -17,6 +17,19 @@ * Don't build project in installation script; * Add development branch 'development'; +* Rename arch-macros to arc; +* Update versioning scheme; +* Rename impl macros to imp; +* Rename os macros to sys; +* Remove FEATURE-WHISHLIST and move relevavnt content to readme; +* Bump API version; +* Update readme (fix typo); +* Fix useq; +* Add more comments to headers; +* Rename sysclret to sysclres; +* Rename cpyret to cpyres; +* Update sysclid and sysclres types; + # 0.0.2 * Migrate to CMake; diff --git a/FEATURE-WISHLIST.txt b/FEATURE-WISHLIST.txt deleted file mode 100644 index 77658eb..0000000 --- a/FEATURE-WISHLIST.txt +++ /dev/null @@ -1,37 +0,0 @@ -The versioning scheme for zP is a major-minor- -patch scheme, where the major version is the -"API" version and the minor is the "extension" -version. Programs that - -This file lists potential and planned API- -breaks. These are meant to be released -simultaneously to minimise the number of -extraneous and unnecessary breaks. - -When enough planned breaks are present, the -features are implemented and the API version is -incremented along with the extension and patch -versions being reset. - -Interfaces that are not public (those in the -det, prv... namespaces) do NOT cause API-b -reaks, as their use outside of the library is -both deprecated and causes UB (by our -definition). - - - -* Rename arch-macros to arc and impl to imp: -We usually use three-letter abbreviations, -however, other lengths are not prohibited. -Nevertheless, our coding style favours the -closest to three letters. Arc is already an -abbreviation for arch, so it doesn't seem too -far-fetched. The same goes for imp, and nobody -is (really) going to think we are dealing with -small numina. - -* Relicense project: -I'll have to research this a bit, but I'm not -sure if the MPL2 is permissive enough for my -needs. @@ -18,7 +18,7 @@ algorithms and the querying of system details. in C++, but for some targets they may be implemented in a platform-dependent manner (such as in an assembly language) for the sake -of performance. Despite this, the language is +of performance. Nevertheless, the library is still quite early in its development, and these algorithms may still not be the most efficient. @@ -46,6 +46,23 @@ using pre-defined settings. Note that it does recursively remove the build directory before initialising it. +# DEVELOPMENT + +Currently, I - the maintainer - do not accept +any code submissions (I do, however, accept +suggestions). This may change in the future. + +## VERSIONING + +The versioning scheme for zP is a major-minor- +patch scheme. The major version is the "API" +version. The minor version is the "EXT" +(extension) version. API version change +(existing) interfaces in the API, whilst the +EXT version only adds to it, meaning programs +targeting a specific API also support all later +EXT versions of the same API. + # COPYRIGHT AND LICENSE Copyright 2022-2023 Gabriel Jensen. diff --git a/zp/include/zp/bs b/zp/include/zp/bs index c2d06fd..35dbb6b 100644 --- a/zp/include/zp/bs +++ b/zp/include/zp/bs @@ -76,7 +76,7 @@ namespace zp { using c02 = ::zp_c02; using sysclid = ::zp_sysclid; - using sysclret = ::zp_sysclret; + using sysclres = ::zp_sysclres; using nulptrtyp = ::zp_nulptrtyp; @@ -320,7 +320,7 @@ namespace zp { [[noreturn]] zp_iln inline auto trp() noexcept -> void; [[noreturn]] zp_iln inline auto urch() noexcept -> void; - template<typename... typs> zp_iln inline auto syscl(::zp::sysclid id,typs const &... args) noexcept -> ::zp::sysclret; + template<typename... typs> zp_iln inline auto syscl(::zp::sysclid id,typs const &... args) noexcept -> ::zp::sysclres; } #include <zp/bs.d/isconsteval.ii> diff --git a/zp/include/zp/bs.d/syscl.ii b/zp/include/zp/bs.d/syscl.ii index 0c2f31c..273324e 100644 --- a/zp/include/zp/bs.d/syscl.ii +++ b/zp/include/zp/bs.d/syscl.ii @@ -4,6 +4,6 @@ If a copy of the MPL was not distributed with this file, You can obtain one at <https://mozilla.org/MPL/2.0>. */ -template<typename... typs> inline auto ::zp::syscl(::zp::sysclid const id,typs const &... args) noexcept -> ::zp::sysclret { +template<typename... typs> inline auto ::zp::syscl(::zp::sysclid const id,typs const &... args) noexcept -> ::zp::sysclres { return ::zp_syscl(id,args...); } diff --git a/zp/include/zp/bs.h b/zp/include/zp/bs.h index 9fcb82c..0bfc65f 100644 --- a/zp/include/zp/bs.h +++ b/zp/include/zp/bs.h @@ -88,10 +88,10 @@ being just the GNU ABI. */ -#include <zp/priv/impl.h> +#include <zp/priv/imp.h> -#include <zp/priv/arch.h> -#include <zp/priv/os.h> +#include <zp/priv/arc.h> +#include <zp/priv/sys.h> #include <zp/priv/std.h> @@ -116,7 +116,7 @@ #endif // ext: GCC complains when we use __int128 without using "__extension__". -#ifdef zp_impl_gcc +#ifdef zp_imp_gcc #define zp_priv_ext __extension__ #else #define zp_priv_ext @@ -149,9 +149,9 @@ #endif #endif -#if zp_impl_gcc +#if zp_imp_gcc #define zp_restr __restrict__ -#elif zp_impl_msvc +#elif zp_imp_msvc #define zp_restr __restrict #elif zp_std_c99 #define zp_restr restrict @@ -160,10 +160,10 @@ #endif #if zp_priv_hasbuiltin(__builtin_expect) -#define zp_likly(expr) if (__builtin_expect((expr),0x1)) +#define zp_likly(expr) if (__builtin_expect((expr),0x1)) #define zp_ulikly(expr) if (__builtin_expect((expr),0x0)) #elif zp_std_cxx20 -#define zp_likly(expr) if ((expr)) [[likely]] +#define zp_likly(expr) if ((expr)) [[likely]] #define zp_ulikly(expr) if ((expr)) [[unlikely]] #else #define zp_likly(expr) if ((expr)) @@ -172,7 +172,7 @@ #if zp_priv_hasattr(__noreturn__) #define zp_nret __attribute__ ((__noreturn__)) -#elif zp_impl_msvc +#elif zp_imp_msvc #define zp_nret __declspec (noreturn) #elif zp_std_c23 || zp_std_cxx #define zp_nret [[noreturn]] @@ -190,7 +190,7 @@ #if zp_priv_hasattr(__nothrow__) #define zp_nthrw __attribute__ ((__nothrow__)) -#elif zp_impl_msvc +#elif zp_imp_msvc #define zp_nthrw __declspec (nothrow) #else #define zp_nthrw @@ -199,7 +199,7 @@ #if zp_priv_hasattr(__const__) #define zp_useq __attribute__ ((__const__)) #elif zp_std_c23 -#define zp_useq [[usequenced]] +#define zp_useq [[unsequenced]] #else #define zp_useq #endif @@ -214,7 +214,7 @@ #if zp_priv_hasbuiltin(__builtin_unreachable) #define zp_urch() ((void)__builtin_unreachable()) -#elif zp_impl_msvc +#elif zp_imp_msvc #define zp_urch() ((void)__assume(0x0)) #else #define zp_urch() (zp_trp()) @@ -235,8 +235,35 @@ zp_priv_cdecl #include <zp/priv/chr.h> +/* + We define the sysclid as the platform type + used for system call identifiers (on FreeBSD + ARM64, this is int, and on Linux AMD64, this is + long, despite the __NR macros being int). + + We likewise define the sysclres type for the + return type of the system calls. + + Usually, you can see "/usr/include/unistd.h" + for the official definitions. + + These types do not have to be either integral + or arithmetic types. We assume the system to + define appropriate variables or constants, and + in these cases, neither we nor the programmer + care about the typing. +*/ + +#if zp_sys_freebsd +typedef int zp_sysclid; +typedef int zp_sysclres; +#elif zp_sys_linux +typedef long zp_sysclid; +typedef long zp_sysclres; +#else typedef long unsigned zp_sysclid; -typedef long unsigned zp_sysclret; +typedef long unsigned zp_sysclres; +#endif /* nullptrtyp: The strange type. @@ -269,8 +296,8 @@ typedef zp_intptr typedef void * zp_nulptrtyp; #endif -#define zp_ver ((zp_i04m)+0x0u) // Programs expecting this version will still compile with the current extension version. -#define zp_extver ((zp_i04m)+0x1u) // The extension versions adds functionality without breaking the existing ones. +#define zp_ver ((zp_i04m)+0x1u) // Programs expecting this version will still compile with the current extension version. +#define zp_extver ((zp_i04m)+0x0u) // The extension versions adds functionality without breaking the existing ones. // The patch version is not public as it only changes implementation details. #define zp_bytelen ((zp_sz)+0x8u) @@ -287,7 +314,7 @@ typedef void * zp_nulptrtyp; zp_nret void zp_trp(void); -zp_sysclret zp_syscl(zp_sysclid id,...); +zp_sysclres zp_syscl(zp_sysclid id,...); zp_priv_cdeclend diff --git a/zp/include/zp/mem b/zp/include/zp/mem index 976a54c..dbd02d9 100644 --- a/zp/include/zp/mem +++ b/zp/include/zp/mem @@ -11,12 +11,12 @@ #include <zp/mem.h> namespace zp { - template<typename dsttyp,typename srctyp> struct cpyret { + template<typename dsttyp,typename srctyp> struct cpyres { dsttyp * dst; srctyp * src; }; - template<typename dsttyp,typename srctyp> zp_iln inline auto memcpy(dsttyp * zp_restr dst,srctyp const * zp_restr src,::zp::sz const num) noexcept -> ::zp::cpyret<dsttyp,srctyp>; + template<typename dsttyp,typename srctyp> zp_iln inline auto memcpy(dsttyp * zp_restr dst,srctyp const * zp_restr src,::zp::sz const num) noexcept -> ::zp::cpyres<dsttyp,srctyp>; template<typename ltyp,typename rtyp> zp_useres zp_iln inline auto memequ(ltyp const * lbuf,rtyp const * rbuf,::zp::sz const num) noexcept -> bool; @@ -25,7 +25,7 @@ namespace zp { template<typename typ> zp_useres zp_iln inline auto memsrh(typ * buf,char unsigned val,::zp::sz const num) noexcept -> typ *; template<typename typ> zp_useres zp_iln inline auto memsrh(typ const * buf,char unsigned val,::zp::sz const num) noexcept -> typ const *; - template<typename typ> constexpr auto cpy(typ * zp_restr dst,typ const * zp_restr src,::zp::sz const num) noexcept -> ::zp::cpyret<typ,typ>; + template<typename typ> constexpr auto cpy(typ * zp_restr dst,typ const * zp_restr src,::zp::sz const num) noexcept -> ::zp::cpyres<typ,typ>; template<typename typ> zp_useres constexpr auto equ(typ const * lbuf,typ const * rbuf,::zp::sz const num) noexcept -> bool; diff --git a/zp/include/zp/mem.d/cpy.ii b/zp/include/zp/mem.d/cpy.ii index 34e92a0..3a09996 100644 --- a/zp/include/zp/mem.d/cpy.ii +++ b/zp/include/zp/mem.d/cpy.ii @@ -4,9 +4,9 @@ If a copy of the MPL was not distributed with this file, You can obtain one at <https://mozilla.org/MPL/2.0>. */ -template<typename typ> constexpr auto ::zp::cpy(typ * zp_restr dst,typ const * zp_restr src,::zp::sz const num) noexcept -> ::zp::cpyret<typ,typ> { +template<typename typ> constexpr auto ::zp::cpy(typ * zp_restr dst,typ const * zp_restr src,::zp::sz const num) noexcept -> ::zp::cpyres<typ,typ> { typ * const zp_restr stp = dst+num; while (dst != stp) {*dst++ = *src++;} - return ::zp::cpyret<typ,typ> {dst,const_cast<typ *>(src),}; + return ::zp::cpyres<typ,typ> {dst,const_cast<typ *>(src),}; } diff --git a/zp/include/zp/mem.d/memcpy.ii b/zp/include/zp/mem.d/memcpy.ii index fe7b621..add3f27 100644 --- a/zp/include/zp/mem.d/memcpy.ii +++ b/zp/include/zp/mem.d/memcpy.ii @@ -4,8 +4,8 @@ If a copy of the MPL was not distributed with this file, You can obtain one at <https://mozilla.org/MPL/2.0>. */ -template<typename dsttyp,typename srctyp> inline auto ::zp::memcpy(dsttyp * zp_restr dst,srctyp const * zp_restr src,::zp::sz const num) noexcept -> ::zp::cpyret<dsttyp,srctyp> { - ::zp_cpyret const cpyret = ::zp_memcpy(dst,src,num); +template<typename dsttyp,typename srctyp> inline auto ::zp::memcpy(dsttyp * zp_restr dst,srctyp const * zp_restr src,::zp::sz const num) noexcept -> ::zp::cpyres<dsttyp,srctyp> { + ::zp_cpyres const cpyres = ::zp_memcpy(dst,src,num); - return ::zp::cpyret<dsttyp,srctyp> {static_cast<dsttyp *>(cpyret.dst),static_cast<srctyp *>(cpyret.src),}; + return ::zp::cpyres<dsttyp,srctyp> {static_cast<dsttyp *>(cpyres.dst),static_cast<srctyp *>(cpyres.src),}; } diff --git a/zp/include/zp/mem.h b/zp/include/zp/mem.h index e3e4c89..1205f72 100644 --- a/zp/include/zp/mem.h +++ b/zp/include/zp/mem.h @@ -11,12 +11,12 @@ zp_priv_cdecl -struct zp_cpyret { +struct zp_cpyres { void * dst; void * src; }; -zp_nthrw struct zp_cpyret zp_memcpy(void * zp_restr dst, void const * zp_restr src, zp_sz num); +zp_nthrw struct zp_cpyres zp_memcpy(void * zp_restr dst, void const * zp_restr src, zp_sz num); zp_nthrw zp_useres bool zp_memequ(void const * lbuf,void const * rbuf,zp_sz num); zp_nthrw void * zp_memfil(void * dst, char unsigned val, zp_sz num); zp_nthrw zp_useres void * zp_memsrh(void const * buf, char unsigned val, zp_sz num); diff --git a/zp/include/zp/priv/arch.h b/zp/include/zp/priv/arc.h index f3ae133..19a39f8 100644 --- a/zp/include/zp/priv/arch.h +++ b/zp/include/zp/priv/arc.h @@ -39,20 +39,20 @@ || defined(__x86_64__) \ || defined(_M_AMD64) \ || defined(_M_X64) -#define zp_arch_amd64 (0x1) +#define zp_arc_amd64 (0x1) #endif #if \ defined(__arm) \ || defined(__arm__) \ || defined(_M_ARM) -#define zp_arch_arm (0x1) +#define zp_arc_arm (0x1) #endif #if \ defined(__aarch64__) \ || defined(_M_ARM64) -#define zp_arch_arm64 (0x1) +#define zp_arc_arm64 (0x1) #endif #if \ @@ -64,5 +64,5 @@ || defined(_M_I386) \ || defined(_M_I86) \ || defined(_M_IX86) -#define zp_arch_ia32 (0x1) +#define zp_arc_ia32 (0x1) #endif diff --git a/zp/include/zp/priv/chr.h b/zp/include/zp/priv/chr.h index e6e1137..5954b33 100644 --- a/zp/include/zp/priv/chr.h +++ b/zp/include/zp/priv/chr.h @@ -20,17 +20,17 @@ */ #if \ - zp_arch_arm \ -|| zp_arch_arm64 + zp_arc_arm \ +|| zp_arc_arm64 #define zp_uchr (0x1) #else #define zp_uchr (0x0) #endif #if \ - zp_arch_arm \ -|| zp_arch_arm64 \ -|| zp_os_win + zp_arc_arm \ +|| zp_arc_arm64 \ +|| zp_sys_win #define zp_uwchr (0x1) #else #define zp_uwchr (0x0) @@ -45,7 +45,7 @@ #endif #if \ - zp_os_dos + zp_sys_dos #define zp_minvalw ((zp_wchr)+zp_minvalsu) #define zp_maxvalw ((zp_wchr)+zp_maxvalsu) diff --git a/zp/include/zp/priv/flt.h b/zp/include/zp/priv/flt.h index 3d8087e..83b0abe 100644 --- a/zp/include/zp/priv/flt.h +++ b/zp/include/zp/priv/flt.h @@ -39,11 +39,11 @@ #define zp_maxvald ((double)+1.79769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368e+308) #if \ - zp_arch_amd64 \ -|| zp_arch_ia32 + zp_arc_amd64 \ +|| zp_arc_ia32 #if \ - zp_os_dos + zp_sys_dos #if \ __MINGW32__ \ @@ -67,13 +67,13 @@ #endif #elif \ - zp_arch_arm + zp_arc_arm #define zp_minvalld ((long double)-1.79769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368e+308) #define zp_maxvalld ((long double)+1.79769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368e+308) #elif \ - zp_arch_arm64 + zp_arc_arm64 #define zp_minvalld ((long double)-1.189731495357231765085759326628007016196469052641694045529698884212163579755312392324974012848462073525902033564749126859755265433573804462672698751945261490853461958725021262845865799405404493574681566096686172574953791792292256220777095858112702436475442537092608935138247345677279593806773692330094615746119725784172889892521939920757654204864565673356452247278152288867700638935595456496699511441752909606878513250948311396886100526833092128683974752192266386791880873694343077348155564101669971138512786874753496996549221727686770196551512812712488289469952298031867469924683981576664562667786719061499639630341657098305425237220876664630087808767256182803220212219924852375903049520911395910918921205273496768588119030111593018789368039232011671404175845108854706965215605777113516257404818817695075025715299705916714352103671782759119316034498392169720631800164034124698918142227577300459309880454715179606299895507583075851195185857971173167676966057998899352631885417716295302014668802384075846036226606480142977595407135050379808649130157164024060311786908796372510335873512774795275748595417572920936651398752709055215663939505589207804914540432978557623565645991208599669097180808881920063722771431218489011922209679053545963628417326002439732802939524313786668514027381434321036636571171670423586472759561231970793967839279147282720195377060602122638457883204809341717526809639253539447730280863675704796054050525162959099932535265586464682793821550087166946662209865086040990507131145474267411042839542322762994938759613112743837192839682676257555388372814490845395747128162065871588219108887240116651361962050800029176299938826082417547516732269930473133261258921845516815235455354310458114528303607394526100730578774092094736822286015459361126642549541799645333882549670764145955017051330800061253865140180153211929361456500343514792890205532021760061882232615736553377294980974059590520187961459799386741513028505934410453603480192383349321115171811051004108592830991811382552909064873029533418691087118107895004426881765865961841419267486232005929789956207494587649901662172318722999484512325826087031561936383689740686505279775296789331613683822798597040651600524129025149894873153196942095056670847466927644812596506700129443579512479230621373978088731257089799622902183824105412930483065603459863120371744282301377070153823878609951218937542956964157950988060608985782910656238116142203574104757451828170804875257446204128348513829082731722364189380493588338947664370623279820755831646205417488393062838201789547219543194450902113699925965376908192792152122212824578879336506875288617303469517112245451315447164280392523574962804175375927948971096983905242318797695347043690474223813266505639761164438844266531364626851219633994434154098562127395936184421821444273431534507860161614287022720984061569660333372788241037131538077377480152670583257920535569973318188112685673318997967497786786001251403873023920127717626858627038170562807276699687356274072773403132694104831615879354395811585825112837841563222761623334459188131537882355732483030085976890382969734476214593428191212717141333047577867552218517431064848760373196290310124466145087078377140528533048684204278799596652514009368964527494988719996088230065668196236298805733689960371306226158464997243490564472254071897564144128539839986096045563264771285585066304177995720101744844387158329767375560416207800878830072072413908657855667239546369357775781344288195989176313356856417845434232814886744226746707066979755577121788798468777700116472954103621810567107869855646414713502627836321256957407217461738363552424248762436478085351810995749293238174081331905048144612700905541425702220302537611494824228765324577933778519818778697340282580912780674979058938062556856001076057705982166686824756037569615760497619819482052758118532729333127733603742149847001463931981340719681330844408263017545241644293372483217234561694263937855759294448662979095419227451801588425977869694026601427919655168415895923043115191751872713346095752634608254475988154162254952597853199039645883742199236387610395830948074365988397707849632252080920941206268114832425403540515474312327876180802357701527842702008781378306569508588571830140611098042683009530862797403015355464377406249853964481000402231771665700893607521804084523668568649103258862666293372472441435563520595461701042390500795615834505944837326652542467444364861499184275097485253621979537504128523848241127715641240965261646703516395599407360083455079665191393229410544185167999099787655424462558900874388405649169453726739312260234815543297842308646072190147948072928456725835039546121182133640777769925841807579051735838823112759622714067509669913645288281894558925612972425252452248453502562347348900936766966136332741088135837550717443838484760651019872222926016920811114616937143207743488504602012776364256746872315205952601072228970686460932435222754496341763535189105548847634608972381760403137363968e+4932l) #define zp_maxvalld ((long double)+1.189731495357231765085759326628007016196469052641694045529698884212163579755312392324974012848462073525902033564749126859755265433573804462672698751945261490853461958725021262845865799405404493574681566096686172574953791792292256220777095858112702436475442537092608935138247345677279593806773692330094615746119725784172889892521939920757654204864565673356452247278152288867700638935595456496699511441752909606878513250948311396886100526833092128683974752192266386791880873694343077348155564101669971138512786874753496996549221727686770196551512812712488289469952298031867469924683981576664562667786719061499639630341657098305425237220876664630087808767256182803220212219924852375903049520911395910918921205273496768588119030111593018789368039232011671404175845108854706965215605777113516257404818817695075025715299705916714352103671782759119316034498392169720631800164034124698918142227577300459309880454715179606299895507583075851195185857971173167676966057998899352631885417716295302014668802384075846036226606480142977595407135050379808649130157164024060311786908796372510335873512774795275748595417572920936651398752709055215663939505589207804914540432978557623565645991208599669097180808881920063722771431218489011922209679053545963628417326002439732802939524313786668514027381434321036636571171670423586472759561231970793967839279147282720195377060602122638457883204809341717526809639253539447730280863675704796054050525162959099932535265586464682793821550087166946662209865086040990507131145474267411042839542322762994938759613112743837192839682676257555388372814490845395747128162065871588219108887240116651361962050800029176299938826082417547516732269930473133261258921845516815235455354310458114528303607394526100730578774092094736822286015459361126642549541799645333882549670764145955017051330800061253865140180153211929361456500343514792890205532021760061882232615736553377294980974059590520187961459799386741513028505934410453603480192383349321115171811051004108592830991811382552909064873029533418691087118107895004426881765865961841419267486232005929789956207494587649901662172318722999484512325826087031561936383689740686505279775296789331613683822798597040651600524129025149894873153196942095056670847466927644812596506700129443579512479230621373978088731257089799622902183824105412930483065603459863120371744282301377070153823878609951218937542956964157950988060608985782910656238116142203574104757451828170804875257446204128348513829082731722364189380493588338947664370623279820755831646205417488393062838201789547219543194450902113699925965376908192792152122212824578879336506875288617303469517112245451315447164280392523574962804175375927948971096983905242318797695347043690474223813266505639761164438844266531364626851219633994434154098562127395936184421821444273431534507860161614287022720984061569660333372788241037131538077377480152670583257920535569973318188112685673318997967497786786001251403873023920127717626858627038170562807276699687356274072773403132694104831615879354395811585825112837841563222761623334459188131537882355732483030085976890382969734476214593428191212717141333047577867552218517431064848760373196290310124466145087078377140528533048684204278799596652514009368964527494988719996088230065668196236298805733689960371306226158464997243490564472254071897564144128539839986096045563264771285585066304177995720101744844387158329767375560416207800878830072072413908657855667239546369357775781344288195989176313356856417845434232814886744226746707066979755577121788798468777700116472954103621810567107869855646414713502627836321256957407217461738363552424248762436478085351810995749293238174081331905048144612700905541425702220302537611494824228765324577933778519818778697340282580912780674979058938062556856001076057705982166686824756037569615760497619819482052758118532729333127733603742149847001463931981340719681330844408263017545241644293372483217234561694263937855759294448662979095419227451801588425977869694026601427919655168415895923043115191751872713346095752634608254475988154162254952597853199039645883742199236387610395830948074365988397707849632252080920941206268114832425403540515474312327876180802357701527842702008781378306569508588571830140611098042683009530862797403015355464377406249853964481000402231771665700893607521804084523668568649103258862666293372472441435563520595461701042390500795615834505944837326652542467444364861499184275097485253621979537504128523848241127715641240965261646703516395599407360083455079665191393229410544185167999099787655424462558900874388405649169453726739312260234815543297842308646072190147948072928456725835039546121182133640777769925841807579051735838823112759622714067509669913645288281894558925612972425252452248453502562347348900936766966136332741088135837550717443838484760651019872222926016920811114616937143207743488504602012776364256746872315205952601072228970686460932435222754496341763535189105548847634608972381760403137363968e+4932l) @@ -91,7 +91,7 @@ typedef float zp_priv_f02; typedef double zp_priv_f04; #if \ - zp_arch_arm64 // x86 jealous :( + zp_arc_arm64 // x86 jealous :( #define zp_fixflt08 (0x1) typedef long double zp_priv_f08; diff --git a/zp/include/zp/priv/impl.h b/zp/include/zp/priv/imp.h index e18d0b7..200ae8e 100644 --- a/zp/include/zp/priv/impl.h +++ b/zp/include/zp/priv/imp.h @@ -7,29 +7,29 @@ #if \ defined(__clang__) \ || defined(__llvm__) -#define zp_impl_clang (0x1) +#define zp_imp_clang (0x1) #endif #if \ defined(_CRAYC) -#define zp_impl_cray (0x1) +#define zp_imp_cray (0x1) #endif #if \ defined(__GNUC__) -#define zp_impl_gcc (0x1) +#define zp_imp_gcc (0x1) #endif #if \ defined(__EDG__) -#define zp_impl_edg (0x1) +#define zp_imp_edg (0x1) #endif #if \ defined(__ICC) \ || defined(__ICL) \ || defined(__INTEL_COMPILER) -#define zp_impl_icc (0x1) +#define zp_imp_icc (0x1) #endif #if \ @@ -39,12 +39,12 @@ #if \ defined(_MSC_VER) -#define zp_impl_msvc (0x1) +#define zp_imp_msvc (0x1) #endif #if \ defined(__open_xl__) -#define zp_impl_xlc (0x1) +#define zp_imp_xlc (0x1) #endif #if \ @@ -52,15 +52,15 @@ || defined(__VAXC) \ || defined(__vax11c) \ || defined(__vaxc) -#define zp_impl_vsi (0x1) +#define zp_imp_vsi (0x1) #endif #if \ defined(__WATCOMC__) -#define zp_impl_watcom (0x1) +#define zp_imp_watcom (0x1) #endif #if \ defined(__TINYC__) -#define zp_impl_tiny (0x1) +#define zp_imp_tiny (0x1) #endif diff --git a/zp/include/zp/priv/int.h b/zp/include/zp/priv/int.h index d199083..a68b738 100644 --- a/zp/include/zp/priv/int.h +++ b/zp/include/zp/priv/int.h @@ -93,7 +93,7 @@ typedef short unsigned zp_i01; typedef short zp_i01s; #if \ - zp_arch_arm + zp_arc_arm // For some reason long. @@ -139,7 +139,7 @@ typedef zp_i02 zp_i02m; typedef zp_i02s zp_i02ms; #if \ - zp_os_dos + zp_sys_dos #define zp_minvall ((long) -0x80000000ll) #define zp_maxvallu ((long unsigned)+0xFFFFFFFFllu) @@ -162,8 +162,8 @@ typedef zp_i04s zp_i04ms; #else #if \ - zp_arch_amd64 \ -|| zp_arch_arm64 + zp_arc_amd64 \ +|| zp_arc_arm64 #define zp_minvall ((long) -0x8000000000000000ll) #define zp_maxvallu ((long unsigned)+0xFFFFFFFFFFFFFFFFllu) @@ -185,8 +185,8 @@ typedef zp_i04 zp_i04m; typedef zp_i04s zp_i04ms; #elif \ - zp_arch_arm \ -|| zp_arch_ia32 + zp_arc_arm \ +|| zp_arc_ia32 #define zp_minvall ((long) -0x80000000ll) #define zp_maxvallu ((long unsigned)+0xFFFFFFFFllu) @@ -221,11 +221,11 @@ zp_priv_ext typedef __int128 zp_i08s; #endif #if \ - zp_arch_amd64 \ -|| zp_arch_arm64 + zp_arc_amd64 \ +|| zp_arc_arm64 #if \ - zp_os_win + zp_sys_win #define zp_maxvalp ((zp_intptr)+zp_maxvalllu) typedef long long unsigned zp_intptr; @@ -247,8 +247,8 @@ typedef long unsigned zp_sz; #endif #elif \ - zp_arch_arm \ -|| zp_arch_ia32 + zp_arc_arm \ +|| zp_arc_ia32 #define zp_maxvalp zp_maxvaliu typedef int unsigned zp_intptr; diff --git a/zp/include/zp/priv/os.h b/zp/include/zp/priv/sys.h index 7e15eab..dec3ca7 100644 --- a/zp/include/zp/priv/os.h +++ b/zp/include/zp/priv/sys.h @@ -8,10 +8,10 @@ os------- macro---------- vendors----------------------------------- clang cray edg gcc icc icx msvc pcc tiny vsi watcom xlc - aix __TOS_AIX__ clang + aix __Tsys_AIX__ clang aix _AIX clang - dos __DOS__ watcom + dos __Dsys__ watcom dos _DOS watcom drgnfly __DragonFly__ clang @@ -57,25 +57,25 @@ */ #if \ - defined(__TOS_AIX__) \ + defined(__Tsys_AIX__) \ || defined(_AIX) -#define zp_os_aix (0x1) +#define zp_sys_aix (0x1) #endif #if \ defined(__DragonFly__) -#define zp_os_drgnfly (0x1) +#define zp_sys_drgnfly (0x1) #endif #if \ defined(__FreeBSD__) -#define zp_os_freebsd (0x1) +#define zp_sys_freebsd (0x1) #endif #if \ defined(__GNU__) \ || defined(__gnu_hurd__) -#define zp_os_hurd (0x1) +#define zp_sys_hurd (0x1) #endif #if \ @@ -83,45 +83,45 @@ || defined(__gnu_linux__) \ || defined(__linux) \ || defined(__linux__) -#define zp_os_linux (0x1) +#define zp_sys_linux (0x1) #endif #if \ defined(__APPLE__) \ || defined(__MACH__) -#define zp_os_mac (0x1) +#define zp_sys_mac (0x1) #endif #if \ defined(__minix) -#define zp_os_minix (0x1) +#define zp_sys_minix (0x1) #endif #if \ defined(__NetBSD__) -#define zp_os_netbsd (0x1) +#define zp_sys_netbsd (0x1) #endif #if \ defined(__OpenBSD__) -#define zp_os_openbsd (0x1) +#define zp_sys_openbsd (0x1) #endif #if \ defined(__OS2__) -#define zp_os_os2 (0x1) +#define zp_sys_os2 (0x1) #endif #if \ defined(__sun) \ || defined(__sun__) -#define zp_os_sol (0x1) +#define zp_sys_sol (0x1) #endif #if \ defined(__VMS) || defined(__vms) -#define zp_os_vms (0x1) +#define zp_sys_vms (0x1) #endif #if \ @@ -131,30 +131,30 @@ || defined(_WIN32) \ || defined(_WIN64) \ || defined(_WINDOWS) -#define zp_os_win (0x1) +#define zp_sys_win (0x1) #endif #if \ - zp_os_os2 \ -|| zp_os_win \ -|| defined(__DOS__) \ + zp_sys_os2 \ +|| zp_sys_win \ +|| defined(__Dsys__) \ || defined(_DOS) -#define zp_os_dos (0x1) +#define zp_sys_dos (0x1) #endif #if \ - zp_os_aix \ -|| zp_os_drgnfly \ -|| zp_os_freebsd \ -|| zp_os_hurd \ -|| zp_os_linux \ -|| zp_os_mac \ -|| zp_os_minix \ -|| zp_os_netbsd \ -|| zp_os_openbsd \ -|| zp_os_sol \ + zp_sys_aix \ +|| zp_sys_drgnfly \ +|| zp_sys_freebsd \ +|| zp_sys_hurd \ +|| zp_sys_linux \ +|| zp_sys_mac \ +|| zp_sys_minix \ +|| zp_sys_netbsd \ +|| zp_sys_openbsd \ +|| zp_sys_sol \ || defined(__UNIX__) \ || defined(__unix) \ || defined(__unix__) -#define zp_os_unix (0x1) +#define zp_sys_unix (0x1) #endif diff --git a/zp/source/amd64/mem/memcpy.s b/zp/source/amd64/mem/memcpy.s index edc1c4e..99344e7 100644 --- a/zp/source/amd64/mem/memcpy.s +++ b/zp/source/amd64/mem/memcpy.s @@ -63,4 +63,4 @@ zp_memcpy: .done: mov rax,rdi mov rdx,rsi - ret # return (zp_cpyret) {.dst = dst,.src = src}; + ret # return (zp_cpyres) {.dst = dst,.src = src}; diff --git a/zp/source/any/bs/syscl.c b/zp/source/any/bs/syscl.c index e2b8081..33423cf 100644 --- a/zp/source/any/bs/syscl.c +++ b/zp/source/any/bs/syscl.c @@ -6,6 +6,6 @@ #include <zp/bs.h> -zp_sysclret zp_syscl(zp_nuse zp_sysclid id,...) { +zp_sysclres zp_syscl(zp_nuse zp_sysclid id,...) { zp_urch(); // Unsupported. } diff --git a/zp/source/any/mem/memcpy.cc b/zp/source/any/mem/memcpy.cc index eb7161b..b0ef182 100644 --- a/zp/source/any/mem/memcpy.cc +++ b/zp/source/any/mem/memcpy.cc @@ -6,10 +6,10 @@ #include <zp/mem> -extern "C" zp_nthrw auto zp_memcpy(void * const zp_restr dst,void const * const zp_restr src,zp_sz const num) -> struct zp_cpyret { +extern "C" zp_nthrw auto zp_memcpy(void * const zp_restr dst,void const * const zp_restr src,zp_sz const num) -> struct zp_cpyres { auto const ret = ::zp::cpy(static_cast<char unsigned *>(dst),static_cast<char unsigned const *>(src),num); - return ::zp_cpyret { + return ::zp_cpyres { ret.dst, ret.src, }; |