tlively added inline comments.

================
Comment at: clang/lib/Headers/wasm_simd128.h:171
+
+#define wasm_v128_load8_lane(__ptr, __vec, __i)                                
\
+  ((v128_t)__builtin_wasm_load8_lane((signed char *)(__ptr), (__i8x16)(__vec), 
\
----------------
dschuff wrote:
> tlively wrote:
> > aheejin wrote:
> > > dschuff wrote:
> > > > out of curiosity, why are these macros, while all the rest (including 
> > > > ones that don't need declarations such as `wasm_i64x2_eq`) seem to be 
> > > > inline functions?
> > > I was also curious about this too.
> > The `i` parameter needs to be an integer constant, and I never figured out 
> > a way to enforce that for a function parameter. (But using a macro works 
> > because the codegen for the builtin functions can error out on non-constant 
> > arguments.)
> Ah, that makes sense. It does make me wonder, do we have any documentation 
> about those constraints? I guess this file itself is more-or-less what we 
> have, right? If the constraint is violated, is the error from the compiler 
> intelligible?
Yes, the error should be somewhat intelligible, as far as error messages go. So 
far this is all we have, but I would like to get proper documentation at some 
point.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D101112

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to