================
@@ -312,6 +335,11 @@ typedef uint32_t uint32x2_t
__attribute__((__vector_size__(8)));
return __builtin_bit_cast(rty, __x);
\
}
+#define __packed_load(name, ty, elt_ty, ua_ty)
\
+ static __inline__ ty __DEFAULT_FN_ATTRS __riscv_##name(elt_ty *__p) {
\
+ return *(ua_ty *)__p;
\
+ }
----------------
kito-cheng wrote:
Could you declare those type within the function to prevent expose those type
on global name space, e.g.
```suggestion
static __inline__ ty __DEFAULT_FN_ATTRS __riscv_##name(elt_ty *__p) { \
typedef elt_ty ua_ty __attribute__(( __aligned__(1))); \
return *(ua_ty *)__p; \
}
```
https://github.com/llvm/llvm-project/pull/223313
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits