mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-05 15:27:46 -04:00
arm_linux.S for cache ops and random fixes
git-svn-id: file:///home/notaz/opt/svn/PicoDrive@587 be3aeb3a-fb24-0410-a615-afba39da0efa
This commit is contained in:
parent
1cfc5cc4ce
commit
16b0afd029
12 changed files with 51 additions and 36 deletions
26
platform/common/arm_linux.S
Normal file
26
platform/common/arm_linux.S
Normal file
|
@ -0,0 +1,26 @@
|
|||
@ vim:filetype=armasm
|
||||
#include <sys/syscall.h>
|
||||
|
||||
|
||||
.global cache_flush_d_inval_i @ const void *start_addr, const void *end_addr
|
||||
|
||||
cache_flush_d_inval_i:
|
||||
mov r2, #0
|
||||
#ifdef __ARM_EABI__
|
||||
/* EABI version */
|
||||
str r7, [sp, #-4]!
|
||||
mov r7, #(__ARM_NR_cacheflush & 0xff)
|
||||
#if (__ARM_NR_cacheflush & 0x00ff00)
|
||||
orr r7, r7, #(__ARM_NR_cacheflush & 0x00ff00)
|
||||
#endif
|
||||
#if (__ARM_NR_cacheflush & 0xff0000)
|
||||
orr r7, r7, #(__ARM_NR_cacheflush & 0xff0000)
|
||||
#endif
|
||||
swi 0
|
||||
ldr r7, [sp], #4
|
||||
#else
|
||||
/* OABI */
|
||||
swi __ARM_NR_cacheflush
|
||||
#endif
|
||||
bx lr
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue