summaryrefslogtreecommitdiff
path: root/rgo/include/rgo.h
diff options
context:
space:
mode:
Diffstat (limited to 'rgo/include/rgo.h')
-rw-r--r--rgo/include/rgo.h55
1 files changed, 26 insertions, 29 deletions
diff --git a/rgo/include/rgo.h b/rgo/include/rgo.h
index ff3c127..56893d6 100644
--- a/rgo/include/rgo.h
+++ b/rgo/include/rgo.h
@@ -4,20 +4,15 @@
If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
-#if !defined(__x86_64__) && !defined(__i386__)
-#define rgo_noimpl
-#endif
+#include <sus.h>
#if !defined(rgo_ver)
-#if defined(__ASSEMBLER__)
-#define rgo_ver $0x7
-#else
-#define rgo_ver (0x7)
-#endif
+#define rgo_ver sus_typlit_u64(0x8)
-#if defined(__ASSEMBLER__)
+#if defined(sus_lang_asm)
.extern rgo_fndbyte
.extern rgo_fndchr
+.extern rgo_getbinver
.extern rgo_memcpy
.extern rgo_memeq
.extern rgo_memfill
@@ -26,29 +21,31 @@
.extern rgo_strfill
.extern rgo_strlen
#else
-#include <stddef.h>
-#include <stdint.h>
-#if defined(__cplusplus)
-#define rgo_priv_externc extern "C"
-#else
-#define rgo_priv_externc
+#if defined(sus_lang_cxx)
+extern "C" {
+#endif
+
+sus_attr_alloc sus_attr_allocsz(0x2) sus_attr_hot sus_attr_nothrw void * __rgo_memdup( void const * sus_restr ptr, sus_typ_usz num);
+sus_attr_cold sus_attr_const sus_attr_nothrw sus_typ_u8 rgo_fastimpl( void);
+sus_attr_hot sus_attr_nothrw sus_typ_usz rgo_fndbyte( void const * sus_restr ptr, sus_typ_usz num,sus_typ_u8 byte);
+sus_attr_hot sus_attr_nothrw sus_typ_usz rgo_fndchr( char const * sus_restr str, char chr);
+sus_attr_cold sus_attr_nothrw sus_typ_u64 rgo_getbinver(void);
+sus_attr_hot sus_attr_nothrw void rgo_memcpy( void const * sus_restr in, sus_typ_usz num,void * sus_restr out);
+sus_attr_hot sus_attr_nothrw sus_typ_u8 rgo_memeq( void const * sus_restr lptr,sus_typ_usz num,void const * sus_restr rptr);
+sus_attr_hot sus_attr_nothrw void rgo_memfill( void * sus_restr ptr, sus_typ_usz num,sus_typ_u8 val);
+sus_attr_hot sus_attr_nothrw sus_typ_usz rgo_strcpy( char const * sus_restr in, char * sus_restr out);
+sus_attr_alloc sus_attr_hot sus_attr_nothrw char * rgo_strdup( char const * sus_restr str);
+sus_attr_hot sus_attr_nothrw sus_typ_u8 rgo_streq( char const * sus_restr lstr,char const * sus_restr rstr);
+sus_attr_hot sus_attr_nothrw void rgo_strfill( char * sus_restr lstr,char chr);
+sus_attr_hot sus_attr_nothrw sus_typ_usz rgo_strlen( char const * sus_restr str);
+
+#if defined(sus_lang_cxx)
+}
#endif
-rgo_priv_externc __attribute__((alloc_size(0x2),hot,malloc,nothrow)) void * __rgo_memdup(void const * __restrict__ ptr, size_t num);
-rgo_priv_externc __attribute__((hot,nothrow)) size_t rgo_fndbyte( void const * __restrict__ ptr, size_t num,uint8_t byte);
-rgo_priv_externc __attribute__((hot,nothrow)) size_t rgo_fndchr( char const * __restrict__ str, char chr);
-rgo_priv_externc __attribute__((hot,nothrow)) void rgo_memcpy( void const * __restrict__ in, size_t num,void * __restrict__ out);
-rgo_priv_externc __attribute__((hot,nothrow)) uint8_t rgo_memeq( void const * __restrict__ lptr,size_t num,void const * __restrict__ rptr);
-rgo_priv_externc __attribute__((hot,nothrow)) void rgo_memfill( void const * __restrict__ ptr, size_t num,uint8_t val);
-rgo_priv_externc __attribute__((hot,nothrow)) size_t rgo_strcpy( char const * __restrict__ lstr,char const * __restrict__ rstr);
-rgo_priv_externc __attribute__((hot,malloc,nothrow)) char * rgo_strdup( char const * __restrict__ str);
-rgo_priv_externc __attribute__((hot,nothrow)) uint8_t rgo_streq( char const * __restrict__ lstr,char const * __restrict__ rstr);
-rgo_priv_externc __attribute__((hot,nothrow)) void rgo_strfill( char const * __restrict__ lstr,char chr);
-rgo_priv_externc __attribute__((hot,nothrow)) size_t rgo_strlen( char const * __restrict__ str);
-
-#if defined(__cplusplus)
-template<typename T> [[gnu::alloc_size(0x2),gnu::hot,gnu::malloc]] auto rgo_memdup(T const * __restrict__ const _ptr,::size_t const _num) noexcept -> T * {return static_cast<T *>(::__rgo_memdup(_ptr,_num));}
+#if defined(sus_lang_cxx)
+template<typename T> sus_attr_alloc sus_attr_allocsz(0x2) sus_attr_hot sus_attr_nothrw T * rgo_memdup(T const * sus_restr const _ptr,::sus_typ_usz const _num) -> T * {return static_cast<T *>(::__rgo_memdup(_ptr,_num));}
#else
#define rgo_memdup __rgo_memdup
#endif