aboutsummaryrefslogtreecommitdiff
path: root/llvm/tools/llvm-exegesis/lib/BenchmarkRunner.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/tools/llvm-exegesis/lib/BenchmarkRunner.cpp')
-rw-r--r--llvm/tools/llvm-exegesis/lib/BenchmarkRunner.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/llvm/tools/llvm-exegesis/lib/BenchmarkRunner.cpp b/llvm/tools/llvm-exegesis/lib/BenchmarkRunner.cpp
index adee869..fd98af8 100644
--- a/llvm/tools/llvm-exegesis/lib/BenchmarkRunner.cpp
+++ b/llvm/tools/llvm-exegesis/lib/BenchmarkRunner.cpp
@@ -379,7 +379,7 @@ private:
if (ChildSignalInfo.si_signo == SIGSEGV)
return make_error<SnippetSegmentationFault>(
- reinterpret_cast<intptr_t>(ChildSignalInfo.si_addr));
+ reinterpret_cast<uintptr_t>(ChildSignalInfo.si_addr));
return make_error<SnippetSignal>(ChildSignalInfo.si_signo);
}
@@ -477,9 +477,10 @@ private:
if (__rseq_size < 32)
RseqStructSize = 32;
- long RseqDisableOutput =
- syscall(SYS_rseq, (intptr_t)__builtin_thread_pointer() + __rseq_offset,
- RseqStructSize, RSEQ_FLAG_UNREGISTER, RSEQ_SIG);
+ long RseqDisableOutput = syscall(
+ SYS_rseq,
+ reinterpret_cast<uintptr_t>(__builtin_thread_pointer()) + __rseq_offset,
+ RseqStructSize, RSEQ_FLAG_UNREGISTER, RSEQ_SIG);
if (RseqDisableOutput != 0)
exit(ChildProcessExitCodeE::RSeqDisableFailed);
#endif // GLIBC_INITS_RSEQ
@@ -502,7 +503,7 @@ private:
char *FunctionDataCopy =
(char *)mmap(MapAddress, FunctionDataCopySize, PROT_READ | PROT_WRITE,
MapFlags, 0, 0);
- if ((intptr_t)FunctionDataCopy == -1)
+ if (reinterpret_cast<intptr_t>(FunctionDataCopy) == -1)
exit(ChildProcessExitCodeE::FunctionDataMappingFailed);
memcpy(FunctionDataCopy, this->Function.FunctionBytes.data(),
@@ -515,8 +516,8 @@ private:
if (!AuxMemFDOrError)
exit(ChildProcessExitCodeE::AuxiliaryMemorySetupFailed);
- ((void (*)(size_t, int))(intptr_t)FunctionDataCopy)(FunctionDataCopySize,
- *AuxMemFDOrError);
+ ((void (*)(size_t, int))(uintptr_t)FunctionDataCopy)(FunctionDataCopySize,
+ *AuxMemFDOrError);
exit(0);
}