[PATCH] D108083: [sanitizer] Add hexagon support to sanitizer-common

Vitaly Buka via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 17 14:14:45 PDT 2021


vitalybuka added inline comments.


================
Comment at: compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp:94
 # include <sys/ptrace.h>
 #if defined(__mips64) || defined(__aarch64__) || defined(__arm__) || \
+    defined(__hexagon__) || \
----------------
please use clang-format version here.
I don't mind if you blindly clang-format entire patch.


================
Comment at: compiler-rt/lib/sanitizer_common/sanitizer_syscall_linux_hexagon.inc:88
+{
+  register long r6 __asm__("r6") = n;
+  register long r0 __asm__("r0") = a;
----------------
should this use u64 like other __internal_syscall files?


================
Comment at: compiler-rt/lib/sanitizer_common/sanitizer_syscall_linux_hexagon.inc:124
+
+bool internal_iserror(uptr retval, int *rverrno) {
+  if (retval == (uptr)-1) {
----------------
sidneym wrote:
> bcain wrote:
> > @sidneym Can you confirm that this implementation looks correct?  I thought the convention was -1 for failed syscalls.
> Maybe it should be <0 instead.
Why it's not -4095 like in other versions?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D108083/new/

https://reviews.llvm.org/D108083



More information about the cfe-commits mailing list