Skip to content
Snippets Groups Projects
Commit 42786ccf authored by Cupertino Miranda's avatar Cupertino Miranda
Browse files

bpf: calls do not promote attr access_index on lhs

When traversing gimple to introduce CO-RE relocation entries to
expressions that are accesses to attributed perserve_access_index types,
the access is likely to be split in multiple gimple statments.
In order to keep doing the proper CO-RE convertion we will need to mark
the LHS tree nodes of gimple expressions as explicit CO-RE accesses,
such that the gimple traverser will further convert the sub-expressions.

This patch makes sure that this LHS marking will not happen in case the
gimple statement is a function call, which case it is no longer
expecting to keep generating CO-RE accesses with the remaining of the
expression.

gcc/ChangeLog:

	* config/bpf/core-builtins.cc
	(make_gimple_core_safe_access_index): Fix in condition.

gcc/testsuite/ChangeLog:

	* gcc.target/bpf/core-attr-calls.c: New test.
parent d30def00
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment