mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-05 19:43:44 +00:00
all: replace ReadRegister with AsmFull inline assembly
This makes AsmFull more powerful (by supporting return values) and avoids a compiler builtin.
This commit is contained in:
committed by
Ron Evans
parent
9342e73ae1
commit
6389e45d99
@@ -15,5 +15,5 @@ func align(ptr uintptr) uintptr {
|
||||
}
|
||||
|
||||
func getCurrentStackPointer() uintptr {
|
||||
return arm.ReadRegister("sp")
|
||||
return arm.AsmFull("mov {}, sp", nil)
|
||||
}
|
||||
|
||||
@@ -17,5 +17,5 @@ func align(ptr uintptr) uintptr {
|
||||
}
|
||||
|
||||
func getCurrentStackPointer() uintptr {
|
||||
return arm.ReadRegister("sp")
|
||||
return arm.AsmFull("mov {}, sp", nil)
|
||||
}
|
||||
|
||||
@@ -15,5 +15,5 @@ func align(ptr uintptr) uintptr {
|
||||
}
|
||||
|
||||
func getCurrentStackPointer() uintptr {
|
||||
return riscv.ReadRegister("sp")
|
||||
return riscv.AsmFull("mv {}, sp", nil)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user