arm: implement SVCall

The SVCall function call is lowered to an inline "svc" instruction. The
first parameter *must* be a constant number.
This commit is contained in:
Ayke van Laethem
2018-11-21 17:06:56 +01:00
parent ce0ad1daa2
commit d887d645f7
2 changed files with 42 additions and 0 deletions
+12
View File
@@ -54,6 +54,18 @@ func AsmFull(asm string, regs map[string]interface{})
// must be a processor register, reachable with the "mov" instruction.
func ReadRegister(name string) uintptr
// Run the following system call (SVCall) with 1 argument.
func SVCall1(num uintptr, a1 interface{}) uintptr
// Run the following system call (SVCall) with 2 arguments.
func SVCall2(num uintptr, a1, a2 interface{}) uintptr
// Run the following system call (SVCall) with 3 arguments.
func SVCall3(num uintptr, a1, a2, a3 interface{}) uintptr
// Run the following system call (SVCall) with 4 arguments.
func SVCall4(num uintptr, a1, a2, a3, a4 interface{}) uintptr
//go:volatile
type RegValue uint32