mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-17 11:13:27 +00:00
compiler,riscv: implement CSR operations as intrinsics
CSR operations must be implemented in assembly. The easiest way to implement them is with some custom intrinsics in the compiler.
This commit is contained in:
committed by
Ron Evans
parent
ed9b2dbc03
commit
360923abbf
@@ -1306,6 +1306,8 @@ func (c *Compiler) parseCall(frame *Frame, instr *ssa.CallCommon) (llvm.Value, e
|
||||
return c.emitAsmFull(frame, instr)
|
||||
case strings.HasPrefix(name, "device/arm.SVCall"):
|
||||
return c.emitSVCall(frame, instr.Args)
|
||||
case strings.HasPrefix(name, "(device/riscv.CSR)."):
|
||||
return c.emitCSROperation(frame, instr)
|
||||
case strings.HasPrefix(name, "syscall.Syscall"):
|
||||
return c.emitSyscall(frame, instr)
|
||||
case strings.HasPrefix(name, "runtime/volatile.Load"):
|
||||
|
||||
Reference in New Issue
Block a user