2023-09-07 12:51:48 +00:00
|
|
|
/*************************************************************************
|
2023-06-25 15:31:24 +00:00
|
|
|
*
|
2023-09-07 12:51:48 +00:00
|
|
|
* Orca
|
|
|
|
* Copyright 2023 Martin Fouilleul and the Orca project contributors
|
|
|
|
* See LICENSE.txt for licensing information
|
2023-06-25 15:31:24 +00:00
|
|
|
*
|
2023-09-07 12:51:48 +00:00
|
|
|
**************************************************************************/
|
|
|
|
#include <stddef.h>
|
|
|
|
#include <stdint.h>
|
2023-06-25 15:31:24 +00:00
|
|
|
|
|
|
|
void* memset(void* b, int c, size_t n)
|
|
|
|
{
|
2023-09-07 12:51:48 +00:00
|
|
|
return (__builtin_memset(b, c, n));
|
2023-06-25 15:31:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void* memcpy(void* dst, const void* src, size_t n)
|
|
|
|
{
|
2023-09-07 12:51:48 +00:00
|
|
|
return (__builtin_memcpy(dst, src, n));
|
2023-06-25 15:31:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
int _start()
|
|
|
|
{
|
2023-09-07 12:51:48 +00:00
|
|
|
uint8_t buffer[1024];
|
|
|
|
uint8_t dst[1024];
|
|
|
|
memset(buffer, 0xff, 1024);
|
|
|
|
if(buffer[32] != 0xff)
|
|
|
|
{
|
|
|
|
__builtin_unreachable();
|
|
|
|
}
|
2023-06-25 15:31:24 +00:00
|
|
|
|
2023-09-07 12:51:48 +00:00
|
|
|
memcpy(dst, buffer, 1024);
|
|
|
|
if(dst[32] != 0xff)
|
|
|
|
{
|
|
|
|
__builtin_unreachable();
|
|
|
|
}
|
|
|
|
return (0);
|
2023-06-25 15:31:24 +00:00
|
|
|
}
|