Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20210525' into...
[qemu.git] / scripts / coccinelle / cpu_restore_state.cocci
blob61bc749d14a67e341d82e98b8a233fc11306aea5
1 // Remove unneeded tests before calling cpu_restore_state
2 //
3 // spatch --macro-file scripts/cocci-macro-file.h \
4 //        --sp-file ./scripts/coccinelle/cpu_restore_state.cocci \
5 //        --keep-comments --in-place --use-gitgrep --dir target
6 @@
7 expression A;
8 expression C;
9 @@
10 -if (A) {
11      cpu_restore_state(C, A);
14 expression A;
15 expression C;
17 - cpu_restore_state(C, A);
18 - cpu_loop_exit(C);
19 + cpu_loop_exit_restore(C, A);