[PATCH] [MSan][MIPS] VarArgHelper for MIPS64

Mohit Bhakkad mohit.bhakkad at imgtec.com
Tue Feb 17 00:32:25 PST 2015


REPOSITORY
  rL LLVM

================
Comment at: lib/Transforms/Instrumentation/MemorySanitizer.cpp:2889
@@ +2888,3 @@
+      if (ArgSize < 8)
+        VAArgOffset += ArgSize;
+#endif
----------------
eugenis wrote:
> mohit.bhakkad wrote:
> > eugenis wrote:
> > > Should it be += (8 - ArgSize) ?
> > > I assume each argument is extended to 8 bytes.
> > > 
> > For variable args, types char and short int are automatically promoted to int, so anything less than size 8 is of size 4.
> > So  //+= (8 - ArgSize) //and //+= ArgSize// should work same.
> If you want to rely on that, then please add a CHECK that ArgSize == 4.
> 
Going ahead with += (8 - ArgSize) in next revision, as it matches the context, and I don't want another CHECK.

http://reviews.llvm.org/D7182

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list