machine: avoid binary size regression after LLVM memory intrinsics
Somehow moving to LLVM memory intrinsics for calls like memcpy made the machine.sendUSBPacket get inlined. This is a problem because it is called in many different functions and it is just big enough to cause a significant file size increase. Adding //go:noinline solves this problem and gets the examples/blinky1 program below the file size it was before this change (tested: itsybitsy-m0, itsybitsy-m4, circuitplay-bluefruit).
Этот коммит содержится в:
родитель
67c242173c
коммит
c01f81144e
3 изменённых файлов: 3 добавлений и 0 удалений
|
@ -1736,6 +1736,7 @@ func cdcSetup(setup usbSetup) bool {
|
|||
return false
|
||||
}
|
||||
|
||||
//go:noinline
|
||||
func sendUSBPacket(ep uint32, data []byte) {
|
||||
copy(udd_ep_in_cache_buffer[ep][:], data)
|
||||
|
||||
|
|
|
@ -1907,6 +1907,7 @@ func cdcSetup(setup usbSetup) bool {
|
|||
return false
|
||||
}
|
||||
|
||||
//go:noinline
|
||||
func sendUSBPacket(ep uint32, data []byte) {
|
||||
copy(udd_ep_in_cache_buffer[ep][:], data)
|
||||
|
||||
|
|
|
@ -384,6 +384,7 @@ func cdcSetup(setup usbSetup) bool {
|
|||
return false
|
||||
}
|
||||
|
||||
//go:noinline
|
||||
func sendUSBPacket(ep uint32, data []byte) {
|
||||
count := len(data)
|
||||
copy(udd_ep_in_cache_buffer[ep][:], data)
|
||||
|
|
Загрузка…
Создание таблицы
Сослаться в новой задаче