<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/116127>116127</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[llvm-exegesis] DF flag not being restored
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
boomanaiden154
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
boomanaiden154
</td>
</tr>
</table>
<pre>
From the SystemV X86 ABI specification:
> The direction flag DF in the %rFLAGS register must be clear (set to “forward” direction) on function entry and return.
This needs to be done when we touch `rflags` at all. Just clearing `rflags` upon function exit seems like a reasonable enough option as we (for now) do not care about the flag values after the snippet has finished executing.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxUUsFunDAU_BpzeQoyBnbhwCHphqpVb4mqXm38ALfGRn52Nvn7ynSjNBeQ_cYz4_FIIrM4xIG1D0wI5f0mnTQaXdU2TAjWXgqZ4urD8HlWKK_fhjH4DeKK8PRGEbef8Ks7wf3DN6AdJzObSUbjHavvGb8w_v6tH-F5RdAm4JTnMFu5wGUE4w4yJtow_rj_-gQBF0MRA2yJIiiEyaIMwERHGCF6YI-CdZz1X2YfrjLo9_Xlg52JHrJGcv_E0MXwBtJpCBhTcOX_3p5XQ-AQNWV2haC9Q7iu6OCKEH2aVmAnHrJjYicOMoK0toTv2eDhzrjlMyTtn-RfTQRC3Ais-YMgIaAk76SyCOh8Wlbw-wGVlEWZ6GYfwPlrvon24HyESQYEqXyKR2JHgC_SJiSQcw4s75Iz-44RVkkwG2doRQ34ilOKxi1loYda93UvCxyqc121TX3u22Idaj21Le962SCquprnrpFK9W11nuu6bs-FGQQXTVVVDeeirtry3GBfNbXi_CS5lh1rOG7S2NLal630YSkMUcKhqk6VOBdWKrR065zDKxzTW93CkA_dqbQQa7g1FOmDJppoj7IeGHzFBckQay-5PkcKOR2F-RECUvQBdZGCHdYYd8pFFCMT42LimlQ5-Y2JMVPdfnd78L9xikyMhyViYrx5fhnE3wAAAP__4RgJrg">