dev
fanfuqiang 4 years ago
parent 404196c472
commit 2827c9716e

@ -0,0 +1,9 @@
-因为不论是PAX_RAP还是hl-cfi都是针对linux kernel而设计的所以这两个plugin挂在
gcc上测试bench很多测试程序不能运行hash计算就assert过了只能是function_type的
tree.
-对比的具体过程是只是采用了PAX_RAP的call检测也就是forward cfi而hl-cfi只有
forward cfi所以检测结果应该是可以作为一个性能比较参考的。
-intspeed的结果和fpspeed的结果差不多。

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

@ -814,8 +814,14 @@ build_cfi (gimple_stmt_iterator *labile_gsi_addr, basic_block* labile_bb_addr)
gcc_assert (is_gimple_call (cs));
decl = gimple_call_fn (cs);
/* We must be indirect call */
gcc_assert (TREE_CODE (decl) == SSA_NAME);
gcc_assert (TREE_TYPE (TREE_TYPE (decl)) == cs->gimple_call.u.fntype);
/* If wwe set this assert ,will cause a kenerl compile internal bug.
it's looks like a compiler bug, because gcc will generate a
gimple_call(int_cst(0)) gimple code. */
//gcc_assert (TREE_CODE (decl) == SSA_NAME);
if (tree_code (decl) != ssa_name)
return;
gcc_assert (types_compatible_p (tree_type (tree_type (decl)),
cs->gimple_call.u.fntype));
/* build source hash tree */
sh = build_cfi_hash_tree (cs, BUILD_SOURCE_HASH_TREE, NULL);

Loading…
Cancel
Save