mirror of
https://github.com/EnderIce2/Fennix.git
synced 2025-07-06 04:49:16 +00:00
kernel: add aarch64 architecture support
Signed-off-by: EnderIce2 <enderice2@protonmail.com>
This commit is contained in:
21
Userspace/libc/src/softfloat.c
Normal file
21
Userspace/libc/src/softfloat.c
Normal file
@ -0,0 +1,21 @@
|
||||
/*
|
||||
This file is part of Fennix C Library.
|
||||
|
||||
Fennix C Library is free software: you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License as
|
||||
published by the Free Software Foundation, either version 3 of
|
||||
the License, or (at your option) any later version.
|
||||
|
||||
Fennix C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Fennix C Library. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
double __trunctfdf2(long double a)
|
||||
{
|
||||
return (double)a;
|
||||
}
|
@ -108,8 +108,12 @@ export int pthread_rwlockattr_setpshared(pthread_rwlockattr_t *, int);
|
||||
export pthread_t pthread_self(void)
|
||||
{
|
||||
pthread_t tid;
|
||||
#if defined(__amd64__) || defined(__i386__)
|
||||
__asm__ __volatile__("mov %%fs:0, %0"
|
||||
: "=r"(tid));
|
||||
#elif defined(__aarch64__)
|
||||
tid = 0;
|
||||
#endif
|
||||
return tid;
|
||||
}
|
||||
|
||||
|
@ -24,7 +24,10 @@
|
||||
|
||||
export __attribute__((naked, used, no_stack_protector)) void *__tls_get_addr(void *__data)
|
||||
{
|
||||
#warning "__tls_get_addr not implemented"
|
||||
#if defined(__amd64__) || defined(__i386__)
|
||||
__asm__("ud2");
|
||||
#endif
|
||||
}
|
||||
|
||||
int __init_pthread(void)
|
||||
|
Reference in New Issue
Block a user