diff options
| author | bhgv <bhgv.empire@gmail.com> | 2020-05-10 02:59:23 +0300 |
|---|---|---|
| committer | bhgv <bhgv.empire@gmail.com> | 2020-05-10 02:59:23 +0300 |
| commit | 31b4edc67b75658ce5e2d41f2fc87331f4b26d49 (patch) | |
| tree | a7b6ea659fe62e0a7239f29170024f524595fb4d /emu/FreeRTOS/asm-spim.S | |
| parent | c76314f0f38f4ed028610a6db4452879a556b35f (diff) | |
a try to add support of FreeRTOS riscV-64 (k210 cpu). first step
Diffstat (limited to 'emu/FreeRTOS/asm-spim.S')
| -rw-r--r-- | emu/FreeRTOS/asm-spim.S | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/emu/FreeRTOS/asm-spim.S b/emu/FreeRTOS/asm-spim.S new file mode 100644 index 0000000..77ae3d4 --- /dev/null +++ b/emu/FreeRTOS/asm-spim.S @@ -0,0 +1,29 @@ +#include <sys/asm.h> +#include <sys/regdef.h> +#include <asm/cachectl.h> + + +LEAF(FPsave) + cfc1 t0, $31 + sw t0, 0(a0) /* a0 is argument */ + j $31 + END(FPsave) + +LEAF(FPrestore) + lw t0, 0(a0) /* a0 is argument */ + ctc1 t0, $31 + j $31 + END(FPrestore) + +LEAF(_tas) + .set noreorder +1: + ll v0,0(a0) /* a0 is argument */ + or t1, v0, 1 + sc t1,0(a0) + beq t1,zero,1b + nop + j $31 /* lock held */ + nop + .set reorder + END(_tas) |
