Minor stuff
This commit is contained in:
parent
1a5d953a98
commit
fb274538e1
@ -15,7 +15,7 @@
|
|||||||
/ and optional writing functions as well. */
|
/ and optional writing functions as well. */
|
||||||
|
|
||||||
|
|
||||||
#define _FS_MINIMIZE 1
|
#define _FS_MINIMIZE 3
|
||||||
/* This option defines minimization level to remove some basic API functions.
|
/* This option defines minimization level to remove some basic API functions.
|
||||||
/
|
/
|
||||||
/ 0: All basic functions are enabled.
|
/ 0: All basic functions are enabled.
|
||||||
|
@ -4,15 +4,13 @@
|
|||||||
|
|
||||||
.global waitcycles
|
.global waitcycles
|
||||||
.type waitcycles, %function
|
.type waitcycles, %function
|
||||||
|
|
||||||
@waitcycles ( u32 us )
|
|
||||||
waitcycles:
|
waitcycles:
|
||||||
PUSH {R0-R2,LR}
|
push {r0-r2, lr}
|
||||||
STR R0, [SP,#4]
|
str r0, [sp, #4]
|
||||||
waitcycles_loop:
|
waitcycles_loop:
|
||||||
LDR R3, [SP,#4]
|
ldr r3, [sp, #4]
|
||||||
SUBS R2, R3, #1
|
subs r2, r3, #1
|
||||||
STR R2, [SP,#4]
|
str r2, [sp, #4]
|
||||||
CMP R3, #0
|
cmp r3, #0
|
||||||
BNE waitcycles_loop
|
bne waitcycles_loop
|
||||||
POP {R0-R2,PC}
|
pop {r0-r2, pc}
|
||||||
|
@ -11,13 +11,13 @@ void memcpy(void *dest, const void *src, u32 size)
|
|||||||
|
|
||||||
int memcmp(const void *buf1, const void *buf2, u32 size)
|
int memcmp(const void *buf1, const void *buf2, u32 size)
|
||||||
{
|
{
|
||||||
const u8 *buf1c = (const u8 *)buf1;
|
const u8 *buf1c = (const u8 *)buf1,
|
||||||
const u8 *buf2c = (const u8 *)buf2;
|
*buf2c = (const u8 *)buf2;
|
||||||
|
|
||||||
for(u32 i = 0; i < size; i++)
|
for(u32 i = 0; i < size; i++)
|
||||||
{
|
{
|
||||||
int cmp = buf1c[i] - buf2c[i];
|
int cmp = buf1c[i] - buf2c[i];
|
||||||
if(cmp) return cmp;
|
if(cmp != 0) return cmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -18,10 +18,12 @@
|
|||||||
@ reasonable legal notices or author attributions in that material or in the Appropriate Legal
|
@ reasonable legal notices or author attributions in that material or in the Appropriate Legal
|
||||||
@ Notices displayed by works containing it.
|
@ Notices displayed by works containing it.
|
||||||
|
|
||||||
|
.text
|
||||||
.arm
|
.arm
|
||||||
.global flushCaches
|
.align 4
|
||||||
.type flushCaches STT_FUNC
|
|
||||||
|
|
||||||
|
.global flushCaches
|
||||||
|
.type flushCaches, %function
|
||||||
flushCaches:
|
flushCaches:
|
||||||
@ Clean and flush data cache
|
@ Clean and flush data cache
|
||||||
@ Adpated from http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0155a/ch03s03s05.html ,
|
@ Adpated from http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0155a/ch03s03s05.html ,
|
||||||
|
@ -20,7 +20,6 @@
|
|||||||
* Notices displayed by works containing it.
|
* Notices displayed by works containing it.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* memcpy adapted from https://github.com/mid-kid/CakesForeveryWan/blob/557a8e8605ab3ee173af6497486e8f22c261d0e2/source/memfuncs.c
|
* memcpy adapted from https://github.com/mid-kid/CakesForeveryWan/blob/557a8e8605ab3ee173af6497486e8f22c261d0e2/source/memfuncs.c
|
||||||
*/
|
*/
|
||||||
|
@ -20,7 +20,6 @@
|
|||||||
* Notices displayed by works containing it.
|
* Notices displayed by works containing it.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* memcpy adapted from https://github.com/mid-kid/CakesForeveryWan/blob/557a8e8605ab3ee173af6497486e8f22c261d0e2/source/memfuncs.c
|
* memcpy adapted from https://github.com/mid-kid/CakesForeveryWan/blob/557a8e8605ab3ee173af6497486e8f22c261d0e2/source/memfuncs.c
|
||||||
*/
|
*/
|
||||||
|
@ -4,15 +4,13 @@
|
|||||||
|
|
||||||
.global waitcycles
|
.global waitcycles
|
||||||
.type waitcycles, %function
|
.type waitcycles, %function
|
||||||
|
|
||||||
@waitcycles ( u32 us )
|
|
||||||
waitcycles:
|
waitcycles:
|
||||||
PUSH {R0-R2,LR}
|
push {r0-r2, lr}
|
||||||
STR R0, [SP,#4]
|
str r0, [sp, #4]
|
||||||
waitcycles_loop:
|
waitcycles_loop:
|
||||||
LDR R3, [SP,#4]
|
ldr r3, [sp, #4]
|
||||||
SUBS R2, R3, #1
|
subs r2, r3, #1
|
||||||
STR R2, [SP,#4]
|
str r2, [sp, #4]
|
||||||
CMP R3, #0
|
cmp r3, #0
|
||||||
BNE waitcycles_loop
|
bne waitcycles_loop
|
||||||
POP {R0-R2,PC}
|
pop {r0-r2, pc}
|
||||||
|
Reference in New Issue
Block a user