mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-04-22 15:11:27 +00:00
Fix unaligned access with LTO (#7801)
Forces 4 byte alignment for USB input & output buffers to prevent unaligned accesses by chibios with LTO enabled
This commit is contained in:
parent
480a391929
commit
e9ffc53476
@ -227,8 +227,8 @@ typedef struct {
|
|||||||
.in_size = stream##_EPSIZE, \
|
.in_size = stream##_EPSIZE, \
|
||||||
.out_size = stream##_EPSIZE, \
|
.out_size = stream##_EPSIZE, \
|
||||||
.fixed_size = fixedsize, \
|
.fixed_size = fixedsize, \
|
||||||
.ib = (uint8_t[BQ_BUFFER_SIZE(stream##_IN_CAPACITY, stream##_EPSIZE)]){}, \
|
.ib = (__attribute__((aligned(4))) uint8_t[BQ_BUFFER_SIZE(stream##_IN_CAPACITY, stream##_EPSIZE)]){}, \
|
||||||
.ob = (uint8_t[BQ_BUFFER_SIZE(stream##_OUT_CAPACITY, stream##_EPSIZE)]){}, \
|
.ob = (__attribute__((aligned(4))) uint8_t[BQ_BUFFER_SIZE(stream##_OUT_CAPACITY, stream##_EPSIZE)]){}, \
|
||||||
} \
|
} \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user