LTO build: fix perf regression from strict alias violation and incorrect inline assem...
authorkchoi <code.kchoi@gmail.com>
Fri, 2 Sep 2016 11:00:41 +0000 (04:00 -0700)
committerJan Vorlicek <janvorli@microsoft.com>
Fri, 2 Sep 2016 11:00:41 +0000 (13:00 +0200)
commitf6e17d3c449f5210c9407b7a4a460b64fbf73519
tree36954411ec91b8208b034ee2b0c9825ad13800a8
parent2cbe0e4ea556b753c217f61ab3afd739d267ae1f
LTO build: fix perf regression from strict alias violation and incorrect inline assembly (dotnet/coreclr#7018)

Fix inline assembly implementation of getextcpuid() and strict aliasing violations in its callers

The implementation writes to the unsigned char result array, so
the clobber "memory" is needed.

As well its callers have strict aliasing violations from reading the
result array as a DWORD array. The fix is to memcpy the resulting
buffer onto the DWORD array.

Commit migrated from https://github.com/dotnet/coreclr/commit/882a634da1fb2c6acc0b2414be43ceed28544fbf
src/coreclr/src/vm/amd64/unixstubs.cpp
src/coreclr/src/vm/util.cpp