mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-12 23:13:40 +00:00
compiler: remove support for memory references in AsmFull
Memory references (`*m` in LLVM IR inline assembly) need a pointer type starting in LLVM 14. This is a bit inconvenient and requires a new API in the go-llvm package. Instead of doing that, I'd like to remove support for memory references from AsmFull (and possibly AsmFull entirely if possible: it's hard to use correctly). This breaks tinygo.org/x/drivers/ws2812 for AVR, ARM, and RISC-V which need to be updated. Probably using CGo.
This commit is contained in:
committed by
Ron Evans
parent
52233790cc
commit
cad6a57077
@@ -236,10 +236,10 @@ func (p Pin) SetInterrupt(change PinChange, callback func(Pin)) error {
|
||||
kendryte.GPIOHS.RISE_IE.ClearBits(1 << pin)
|
||||
// Acknowledge interrupt atomically.
|
||||
riscv.AsmFull(
|
||||
"amoor.w {}, {mask}, {reg}",
|
||||
"amoor.w {}, {mask}, ({reg})",
|
||||
map[string]interface{}{
|
||||
"mask": uint32(1 << pin),
|
||||
"reg": &kendryte.GPIOHS.RISE_IP.Reg,
|
||||
"reg": uintptr(unsafe.Pointer(&kendryte.GPIOHS.RISE_IP.Reg)),
|
||||
})
|
||||
kendryte.GPIOHS.RISE_IE.SetBits(1 << pin)
|
||||
}
|
||||
@@ -248,10 +248,10 @@ func (p Pin) SetInterrupt(change PinChange, callback func(Pin)) error {
|
||||
kendryte.GPIOHS.FALL_IE.ClearBits(1 << pin)
|
||||
// Acknowledge interrupt atomically.
|
||||
riscv.AsmFull(
|
||||
"amoor.w {}, {mask}, {reg}",
|
||||
"amoor.w {}, {mask}, ({reg})",
|
||||
map[string]interface{}{
|
||||
"mask": uint32(1 << pin),
|
||||
"reg": &kendryte.GPIOHS.FALL_IP.Reg,
|
||||
"reg": uintptr(unsafe.Pointer(&kendryte.GPIOHS.FALL_IP.Reg)),
|
||||
})
|
||||
kendryte.GPIOHS.FALL_IE.SetBits(1 << pin)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user