[Lldb-commits] [Differential] D83541: Remove Linux sysroot dependencies of SVE PT macros

Muhammad Omair Javaid via lldb-commits lldb-commits at lists.llvm.org
Mon Jul 20 02:55:34 PDT 2020


This revision was automatically updated to reflect the committed changes.
Closed by commit rG7ca9b589c453: Remove Linux sysroot dependencies of SVE PT macros (authored by omjavaid).
Herald added a project: LLDB.

Changed prior to commit:
  https://reviews.llvm.org/D83541?vs=277702&id=279000#toc

Repository:
  rG LLVM Github Monorepo

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


  https://reviews.llvm.org/D83541

Files:
  lldb/source/Plugins/Process/Linux/LinuxPTraceDefines_arm64sve.h
  lldb/source/Plugins/Process/Utility/LinuxPTraceDefines_arm64sve.h



Index: lldb/source/Plugins/Process/Utility/LinuxPTraceDefines_arm64sve.h
===================================================================
--- lldb/source/Plugins/Process/Utility/LinuxPTraceDefines_arm64sve.h
+++ lldb/source/Plugins/Process/Utility/LinuxPTraceDefines_arm64sve.h
@@ -6,15 +6,22 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef lldb_LinuxPTraceDefines_arm64sve_h
-#define lldb_LinuxPTraceDefines_arm64sve_h
+#ifndef LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_LINUXPTRACEDEFINES_ARM64SVE_H
+#define LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_LINUXPTRACEDEFINES_ARM64SVE_H
+
+#include <stdint.h>
+
+struct _aarch64_context {
+  uint16_t magic;
+  uint16_t size;
+};
 
 #define SVE_MAGIC 0x53564501
 
 struct sve_context {
-  struct _aarch64_ctx head;
-  __u16 vl;
-  __u16 __reserved[3];
+  struct _aarch64_context head;
+  uint16_t vl;
+  uint16_t __reserved[3];
 };
 
 /*
@@ -92,8 +99,8 @@
  * Additional data might be appended in the future.
  */
 
-#define SVE_SIG_ZREG_SIZE(vq) ((__u32)(vq)*SVE_VQ_BYTES)
-#define SVE_SIG_PREG_SIZE(vq) ((__u32)(vq) * (SVE_VQ_BYTES / 8))
+#define SVE_SIG_ZREG_SIZE(vq) ((uint32_t)(vq)*SVE_VQ_BYTES)
+#define SVE_SIG_PREG_SIZE(vq) ((uint32_t)(vq) * (SVE_VQ_BYTES / 8))
 #define SVE_SIG_FFR_SIZE(vq) SVE_SIG_PREG_SIZE(vq)
 
 #define SVE_SIG_REGS_OFFSET                                                    \
@@ -123,12 +130,12 @@
 /* SVE/FP/SIMD state (NT_ARM_SVE) */
 
 struct user_sve_header {
-  __u32 size;     /* total meaningful regset content in bytes */
-  __u32 max_size; /* maxmium possible size for this thread */
-  __u16 vl;       /* current vector length */
-  __u16 max_vl;   /* maximum possible vector length */
-  __u16 flags;
-  __u16 __reserved;
+  uint32_t size;     /* total meaningful regset content in bytes */
+  uint32_t max_size; /* maxmium possible size for this thread */
+  uint16_t vl;       /* current vector length */
+  uint16_t max_vl;   /* maximum possible vector length */
+  uint16_t flags;
+  uint16_t __reserved;
 };
 
 /* Definitions for user_sve_header.flags: */
@@ -206,8 +213,8 @@
 #define SVE_PT_SVE_ZREG_SIZE(vq) SVE_SIG_ZREG_SIZE(vq)
 #define SVE_PT_SVE_PREG_SIZE(vq) SVE_SIG_PREG_SIZE(vq)
 #define SVE_PT_SVE_FFR_SIZE(vq) SVE_SIG_FFR_SIZE(vq)
-#define SVE_PT_SVE_FPSR_SIZE sizeof(__u32)
-#define SVE_PT_SVE_FPCR_SIZE sizeof(__u32)
+#define SVE_PT_SVE_FPSR_SIZE sizeof(uint32_t)
+#define SVE_PT_SVE_FPCR_SIZE sizeof(uint32_t)
 
 #define __SVE_SIG_TO_PT(offset)                                                \
   ((offset)-SVE_SIG_REGS_OFFSET + SVE_PT_REGS_OFFSET)
@@ -250,4 +257,4 @@
        ? SVE_PT_SVE_OFFSET + SVE_PT_SVE_SIZE(vq, flags)                        \
        : SVE_PT_FPSIMD_OFFSET + SVE_PT_FPSIMD_SIZE(vq, flags))
 
-#endif
+#endif // LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_LINUXPTRACEDEFINES_ARM64SVE_H


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D83541.279000.patch
Type: text/x-patch
Size: 2850 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20200720/d44046f9/attachment.bin>


More information about the lldb-commits mailing list