1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-06 14:20:11 +00:00

libm.s -> ll.c (#661)

* .

* remove tools/ZAP2 from origin master

* libm.s -> ll.c

* fix progress.py (i think?)
This commit is contained in:
Lucas Shaw 2021-01-31 11:27:50 -07:00 committed by GitHub
parent 8e8421fdec
commit 6fd644dff5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 56 additions and 220 deletions

47
src/libultra_boot_O1/ll.c Normal file
View file

@ -0,0 +1,47 @@
#include "global.h"
s64 __ull_rshift(u64 l, s64 r) {
return l >> r;
}
u64 __ull_rem(u64 l, u64 r) {
return l % r;
}
u64 __ull_div(u64 l, u64 r) {
return l / r;
}
s64 __ll_lshift(s64 l, s64 r) {
return l << r;
}
s64 __ll_rem(s64 l, u64 r) {
return l % r;
}
s64 __ll_div(s64 l, s64 r) {
return l / r;
}
s64 __ll_mul(s64 l, s64 r) {
return l * r;
}
void __ull_divremi(u64* quotient, u64* remainder, u64 dividend, u16 divisor) {
*quotient = dividend / divisor;
*remainder = dividend % divisor;
}
s64 __ll_mod(s64 l, s64 r) {
s64 remainder = l % r;
if (((remainder < 0) && (r > 0)) || ((remainder > 0) && (r < 0))) {
remainder += r;
}
return remainder;
}
s64 __ll_rshift(s64 l, s64 r) {
return l >> r;
}