github.com/usbarmory/GoTEE@v0.0.0-20240405084336-c52770d9fcdb/syscall/syscall_arm.s (about) 1 // Copyright (c) WithSecure Corporation 2 // https://foundry.withsecure.com 3 // 4 // Use of this source code is governed by the license 5 // that can be found in the LICENSE file. 6 7 #include "go_asm.h" 8 9 // func Supervisor() 10 TEXT ·Supervisor(SB),$0 11 SWI $0 12 RET 13 14 // func Exit() 15 TEXT ·Exit(SB),$0 16 MOVW $const_SYS_EXIT, R0 17 18 SWI $0 19 20 RET 21 22 // func Print(c byte) 23 TEXT ·Print(SB),$0-1 24 MOVW $const_SYS_WRITE, R0 25 MOVB c+0(FP), R1 26 27 SWI $0 28 29 RET 30 31 // func Nanotime() int64 32 TEXT ·Nanotime(SB),$0-8 33 MOVW $const_SYS_NANOTIME, R0 34 35 SWI $0 36 37 MOVW R0, ret_lo+0(FP) 38 MOVW R1, ret_hi+4(FP) 39 40 RET 41 42 // func Write(trap uint, b []byte, n uint) 43 TEXT ·Write(SB),$0-20 44 MOVW trap+0(FP), R0 45 MOVW b+4(FP), R1 46 MOVW n+16(FP), R2 47 48 SWI $0 49 50 RET 51 52 // func Read(trap uint, b []byte, n uint) int 53 TEXT ·Read(SB),$0-24 54 MOVW trap+0(FP), R0 55 MOVW b+4(FP), R1 56 MOVW n+16(FP), R2 57 58 SWI $0 59 60 MOVW R0, ret+20(FP) 61 62 RET