OLD | NEW |
---|---|
1 // Copyright 2014 Google Inc. All Rights Reserved. | 1 // Copyright 2014 Google Inc. All Rights Reserved. |
2 // | 2 // |
3 // Licensed under the Apache License, Version 2.0 (the "License"); | 3 // Licensed under the Apache License, Version 2.0 (the "License"); |
4 // you may not use this file except in compliance with the License. | 4 // you may not use this file except in compliance with the License. |
5 // You may obtain a copy of the License at | 5 // You may obtain a copy of the License at |
6 // | 6 // |
7 // http://www.apache.org/licenses/LICENSE-2.0 | 7 // http://www.apache.org/licenses/LICENSE-2.0 |
8 // | 8 // |
9 // Unless required by applicable law or agreed to in writing, software | 9 // Unless required by applicable law or agreed to in writing, software |
10 // distributed under the License is distributed on an "AS IS" BASIS, | 10 // distributed under the License is distributed on an "AS IS" BASIS, |
(...skipping 11 matching lines...) Expand all Loading... | |
22 // This is to ensure that we have our own version of the CRT so as not to | 22 // This is to ensure that we have our own version of the CRT so as not to |
23 // conflict with instrumented code. | 23 // conflict with instrumented code. |
24 #ifdef _DLL | 24 #ifdef _DLL |
25 #error Must be statically linked to the CRT. | 25 #error Must be statically linked to the CRT. |
26 #endif | 26 #endif |
27 | 27 |
28 void InitializeCrt() { | 28 void InitializeCrt() { |
29 // Disable SSE2 instructions. This is to ensure that our instrumentation | 29 // Disable SSE2 instructions. This is to ensure that our instrumentation |
30 // doesn't inadvertently tinker with SSE2 registers via the CRT, causing | 30 // doesn't inadvertently tinker with SSE2 registers via the CRT, causing |
31 // instrumented SSE2 enabled instructions to screw up. | 31 // instrumented SSE2 enabled instructions to screw up. |
32 #ifndef _WIN64 | |
33 // SSE registers are a part of the x64 calling convention, so they | |
34 // cannot be disabled. | |
chrisha
2016/08/03 17:40:05
Add to this comment:
The 64-bit version of the ru
| |
32 const int kDisableSSE2 = 0; | 35 const int kDisableSSE2 = 0; |
33 _set_SSE2_enable(kDisableSSE2); | 36 _set_SSE2_enable(kDisableSSE2); |
37 #endif | |
34 } | 38 } |
35 | 39 |
36 } // namespace common | 40 } // namespace common |
37 } // namespace agent | 41 } // namespace agent |
OLD | NEW |