mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-04-04 00:31:54 +00:00
[DFSan] Add UnaryOperator visitor to DataFlowSanitizer
Differential Revision: https://reviews.llvm.org/D62815 llvm-svn: 363814
This commit is contained in:
parent
d874f8826a
commit
e4e6a3000e
@ -437,6 +437,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
void visitOperandShadowInst(Instruction &I);
|
void visitOperandShadowInst(Instruction &I);
|
||||||
|
void visitUnaryOperator(UnaryOperator &UO);
|
||||||
void visitBinaryOperator(BinaryOperator &BO);
|
void visitBinaryOperator(BinaryOperator &BO);
|
||||||
void visitCastInst(CastInst &CI);
|
void visitCastInst(CastInst &CI);
|
||||||
void visitCmpInst(CmpInst &CI);
|
void visitCmpInst(CmpInst &CI);
|
||||||
@ -1398,6 +1399,10 @@ void DFSanVisitor::visitStoreInst(StoreInst &SI) {
|
|||||||
DFSF.storeShadow(SI.getPointerOperand(), Size, Align, Shadow, &SI);
|
DFSF.storeShadow(SI.getPointerOperand(), Size, Align, Shadow, &SI);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DFSanVisitor::visitUnaryOperator(UnaryOperator &UO) {
|
||||||
|
visitOperandShadowInst(UO);
|
||||||
|
}
|
||||||
|
|
||||||
void DFSanVisitor::visitBinaryOperator(BinaryOperator &BO) {
|
void DFSanVisitor::visitBinaryOperator(BinaryOperator &BO) {
|
||||||
visitOperandShadowInst(BO);
|
visitOperandShadowInst(BO);
|
||||||
}
|
}
|
||||||
|
@ -62,3 +62,13 @@ define i8 @udiv(i8 %a, i8 %b) {
|
|||||||
%c = udiv i8 %a, %b
|
%c = udiv i8 %a, %b
|
||||||
ret i8 %c
|
ret i8 %c
|
||||||
}
|
}
|
||||||
|
|
||||||
|
define double @fneg(double %a) {
|
||||||
|
; CHECK: @"dfs$fneg"
|
||||||
|
; CHECK: load{{.*}}__dfsan_arg_tls
|
||||||
|
; CHECK: fneg double
|
||||||
|
; CHECK: store{{.*}}__dfsan_retval_tls
|
||||||
|
; CHECK: ret double
|
||||||
|
%c = fneg double %a
|
||||||
|
ret double %c
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user