majnemer accepted this revision.
majnemer added a comment.
This revision is now accepted and ready to land.
LGTM
https://reviews.llvm.org/D25334
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/c
agutowski updated this revision to Diff 74603.
agutowski added a comment.
force the alignment to 1
https://reviews.llvm.org/D25334
Files:
include/clang/Basic/BuiltinsX86.def
lib/CodeGen/CGBuiltin.cpp
lib/Headers/intrin.h
test/CodeGen/ms-intrinsics.c
test/Headers/ms-intrin.cpp
Index:
majnemer added inline comments.
Comment at: lib/CodeGen/CGBuiltin.cpp:
+Address Dest = EmitPointerWithAlignment(E->getArg(0));
+return Builder.CreateMemSet(Dest, Ops[1], Ops[2], true);
}
I think we should manually force the alignment to 1 instead o
agutowski updated this revision to Diff 74596.
agutowski added a comment.
rebase
https://reviews.llvm.org/D25334
Files:
include/clang/Basic/BuiltinsX86.def
lib/CodeGen/CGBuiltin.cpp
lib/Headers/intrin.h
test/CodeGen/ms-intrinsics.c
test/Headers/ms-intrin.cpp
Index: lib/Headers/intri
majnemer added inline comments.
Comment at: lib/CodeGen/CGBuiltin.cpp:7610
+Value *SizeVal = EmitScalarExpr(E->getArg(2));
+EmitNonNullArgCheck(RValue::get(Dest.getPointer()),
E->getArg(0)->getType(),
+E->getArg(0)->getExprLoc(), FD, 0);
-
agutowski marked 2 inline comments as done.
agutowski added inline comments.
Comment at: lib/CodeGen/CGBuiltin.cpp:7610
+Value *SizeVal = EmitScalarExpr(E->getArg(2));
+EmitNonNullArgCheck(RValue::get(Dest.getPointer()),
E->getArg(0)->getType(),
+
agutowski updated this revision to Diff 74157.
agutowski added a comment.
remove nullptr check; don't repeat EmitScalarExpr
https://reviews.llvm.org/D25334
Files:
include/clang/Basic/BuiltinsX86.def
lib/CodeGen/CGBuiltin.cpp
lib/Headers/intrin.h
test/CodeGen/ms-intrinsics.c
test/Heade
agutowski marked an inline comment as done.
agutowski added inline comments.
> hans wrote in CGBuiltin.cpp:7613
> Why is it returning Dest here, and not the result of Builder.CreateMemSet?
My mistake (that's what memset returns), thanks!
https://reviews.llvm.org/D25334
__
agutowski updated this revision to Diff 73828.
agutowski marked an inline comment as done.
agutowski added a comment.
fix return value and comment
https://reviews.llvm.org/D25334
Files:
include/clang/Basic/BuiltinsX86.def
lib/CodeGen/CGBuiltin.cpp
lib/Headers/intrin.h
test/CodeGen/ms-in
hans added inline comments.
> CGBuiltin.cpp:7604
> + case X86::BI__stosb: {
> +// we treat __stosb as volatile memset - it may not generate "rep stosb"
> +// instruction, but it will create a memset that won't be optimized away
Nit: I'd suggest capital w for "We" and ending the sentenc
agutowski created this revision.
agutowski added reviewers: rnk, hans, thakis, majnemer.
agutowski added a subscriber: cfe-commits.
We need __stosb to be an intrinsic, because SecureZeroMemory function uses it
without including intrin.h. Implementing it as a volatile memset is not
consistent wit
11 matches
Mail list logo