xref: /third_party/ltp/tools/sparse/sparse-src/validation/linear/asm-memop.c
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/ltp/tools/sparse/sparse-src/validation/linear/
1f08c3bdfSopenharmony_cistatic int foo(int *p)
2f08c3bdfSopenharmony_ci{
3f08c3bdfSopenharmony_ci	asm("op %0" : "=m" (p[0]));
4f08c3bdfSopenharmony_ci
5f08c3bdfSopenharmony_ci	return p[0];
6f08c3bdfSopenharmony_ci}
7f08c3bdfSopenharmony_ci
8f08c3bdfSopenharmony_ci/*
9f08c3bdfSopenharmony_ci * check-name: linear-asm-memop
10f08c3bdfSopenharmony_ci * check-command: test-linearize $file
11f08c3bdfSopenharmony_ci *
12f08c3bdfSopenharmony_ci * check-output-start
13f08c3bdfSopenharmony_cifoo:
14f08c3bdfSopenharmony_ci.L0:
15f08c3bdfSopenharmony_ci	<entry-point>
16f08c3bdfSopenharmony_ci	asm         "op %0"
17f08c3bdfSopenharmony_ci		out: "=m" (%arg1)
18f08c3bdfSopenharmony_ci	load.32     %r4 <- 0[%arg1]
19f08c3bdfSopenharmony_ci	ret.32      %r4
20f08c3bdfSopenharmony_ci
21f08c3bdfSopenharmony_ci
22f08c3bdfSopenharmony_ci * check-output-end
23f08c3bdfSopenharmony_ci */
24

Indexes created Thu Nov 07 10:32:03 CST 2024