microblaze port
based on initial work by rdp, with heavy modifications. some features including threads are untested because qemu app-level emulation seems to be broken and I do not have a proper system image for testing.
This commit is contained in:
parent
e0ea44cb76
commit
8c0a3d9e5c
45 changed files with 2213 additions and 0 deletions
5
src/thread/microblaze/__set_thread_area.s
Normal file
5
src/thread/microblaze/__set_thread_area.s
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
.global __set_thread_area
|
||||
.type __set_thread_area,@function
|
||||
__set_thread_area:
|
||||
rtsd r15, 8
|
||||
ori r21, r5, 0
|
||||
8
src/thread/microblaze/__unmapself.s
Normal file
8
src/thread/microblaze/__unmapself.s
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
.global __unmapself
|
||||
.type __unmapself,@function
|
||||
__unmapself:
|
||||
ori r12, r0, 91
|
||||
brki r14, 0x8
|
||||
ori r12, r0, 1
|
||||
brki r14, 0x8
|
||||
nop
|
||||
33
src/thread/microblaze/clone.s
Normal file
33
src/thread/microblaze/clone.s
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
.global __clone
|
||||
.weak clone
|
||||
.type __clone,@function
|
||||
.type clone,@function
|
||||
|
||||
# r5, r6, r7, r8, r9, r10, stack
|
||||
# fn, st, fl, ar, pt, tl, ct
|
||||
# fl, st, pt, tl, ctx
|
||||
|
||||
__clone:
|
||||
clone:
|
||||
andi r6, r6, -16
|
||||
addi r6, r6, -16
|
||||
swi r5, r6, 0
|
||||
swi r8, r6, 4
|
||||
|
||||
ori r5, r7, 0
|
||||
ori r7, r9, 0
|
||||
ori r8, r10, 0
|
||||
lwi r9, r1, 28
|
||||
ori r12, r0, 120
|
||||
|
||||
brki r14, 8
|
||||
beqi r3, 1f
|
||||
rtsd r15, 8
|
||||
nop
|
||||
|
||||
1: lwi r3, r1, 0
|
||||
lwi r5, r1, 4
|
||||
brald r15, r3
|
||||
nop
|
||||
ori r12, r0, 1
|
||||
brki r14, 8
|
||||
19
src/thread/microblaze/syscall_cp.s
Normal file
19
src/thread/microblaze/syscall_cp.s
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
.global __syscall_cp_asm
|
||||
.type __syscall_cp_asm,@function
|
||||
__syscall_cp_asm:
|
||||
.global __cp_begin
|
||||
__cp_begin:
|
||||
lwi r5, r5, 0
|
||||
bnei r5, __cancel
|
||||
addi r12, r6, 0
|
||||
add r5, r7, r0
|
||||
add r6, r8, r0
|
||||
add r7, r9, r0
|
||||
add r8, r10, r0
|
||||
lwi r9, r1, 28
|
||||
lwi r10, r1, 32
|
||||
brki r14, 0x8
|
||||
.global __cp_end
|
||||
__cp_end:
|
||||
rtsd r15, 8
|
||||
nop
|
||||
Loading…
Add table
Add a link
Reference in a new issue