1
0
mirror of https://github.com/wolfpld/tracy synced 2025-04-29 12:23:53 +00:00
Bartosz Taudul 3b03e849f0 Harden client code against unaligned memory access.
There shouldn't be any changes in generated code on modern
architectures, as the memcpy will be reduced to a store/load operation
identical to the one generated with plain struct member access.

GetTime( cpu ) needs special handling, as the MSVC intrinsic for rdtscp
can't store cpu identifier in a register. Using intermediate variable
would cause store to stack, read from stack, store to the destination
address. Since rdtscp is only available on x86, which handles unaligned
stores without any problems, we can have one place with direct struct
member access.
2018-03-31 14:15:04 +02:00
..
2018-03-04 15:51:10 +01:00
2018-03-04 15:51:10 +01:00