diff options
author | SaeHie Park <saehie.park@samsung.com> | 2016-06-03 10:40:51 +0900 |
---|---|---|
committer | SaeHie Park <saehie.park@samsung.com> | 2016-06-03 10:43:20 +0900 |
commit | 6f452d187df765f537195ec2de4aeff942cd6c26 (patch) | |
tree | 6cbe0e9aa38603d7c224f379965e2f414b0b1c4b | |
parent | a53a9eb2da782630f80e5f6afcf89c6cf5ea5ab5 (diff) | |
download | coreclr-6f452d187df765f537195ec2de4aeff942cd6c26.tar.gz coreclr-6f452d187df765f537195ec2de4aeff942cd6c26.tar.bz2 coreclr-6f452d187df765f537195ec2de4aeff942cd6c26.zip |
ARM64/Linux: fix compile error 'cannot be narrowed to type int'
This fixes ARM64 Linux compilation error
```
src/vm/gccover.cpp:1219:14: error: case value evaluates to 3134983650, which cannot be narrowed to type 'int' [-Wc++11-narrowing]
case INTERRUPT_INSTR_PROTECT_RET:
^
src/vm/gccover.h:105:41: note: expanded from macro 'INTERRUPT_INSTR_PROTECT_RET'
```
-rw-r--r-- | src/vm/gccover.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/vm/gccover.cpp b/src/vm/gccover.cpp index 9dda25eafa..044419eda1 100644 --- a/src/vm/gccover.cpp +++ b/src/vm/gccover.cpp @@ -1207,11 +1207,13 @@ bool IsGcCoverageInterrupt(LPVOID ip) } // Now it's safe to dereference the IP to check the instruction -#ifdef _TARGET_ARM_ +#if defined(_TARGET_ARM64_) + UINT32 instructionCode = *reinterpret_cast<UINT32 *>(ip); +#elif defined(_TARGET_ARM_) UINT16 instructionCode = *reinterpret_cast<UINT16 *>(ip); #else UINT8 instructionCode = *reinterpret_cast<UINT8 *>(ip); -#endif +#endif switch (instructionCode) { case INTERRUPT_INSTR: |