<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html lang="en" style='--code-editor-font: var(--default-mono-font, "GitLab Mono"), JetBrains Mono, Menlo, DejaVu Sans Mono, Liberation Mono, Consolas, Ubuntu Mono, Courier New, andale mono, lucida console, monospace;'>
<head>
<meta content="text/html; charset=US-ASCII" http-equiv="Content-Type">
<title>
GitLab
</title>

<style data-premailer="ignore" type="text/css">
a { color: #1068bf; }
</style>

<style>img {
max-width: 100%; height: auto;
}
body {
font-size: .875rem;
}
body {
-webkit-text-shadow: rgba(255,255,255,.01) 0 0 1px;
}
body {
font-family: "GitLab Sans",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Noto Sans",Ubuntu,Cantarell,"Helvetica Neue",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"; font-size: inherit;
}
</style>
</head>
<body style='font-size: inherit; -webkit-text-shadow: rgba(255,255,255,.01) 0 0 1px; font-family: "GitLab Sans",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Noto Sans",Ubuntu,Cantarell,"Helvetica Neue",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";'>
<div class="content">

<p style="color: #777777;">
<a href="https://gitlab.rtems.org/opticron">Kinsey Moore</a>
commented on a
<a href="https://gitlab.rtems.org/rtems/rtos/rtems/-/issues/5214#note_119875">discussion</a>:
</p>
<div class="md" style="position: relative; z-index: 1; color: #28272d; word-wrap: break-word;">
<p dir="auto" style="color: #28272d; margin: 0 0 16px;" align="initial">Do you agree with these points?:</p>
<ul dir="auto" style="text-align: initial; list-style-type: disc; margin: 0 0 16px; padding: 0;">
<li style="margin-top: 0; line-height: 1.6em; margin-left: 25px; padding-left: 3px;">FPSR upon entering the function is effectively random as per <code style='font-size: 90%; color: #18171d; word-wrap: break-word; background-color: #ececef; border-radius: .25rem; margin-top: 0; font-family: "GitLab Mono","JetBrains Mono","Menlo","DejaVu Sans Mono","Liberation Mono","Consolas","Ubuntu Mono","Courier New","andale mono","lucida console",monospace; vertical-align: bottom; white-space: pre-wrap; overflow-wrap: break-word; word-break: keep-all; padding: 2px 4px;'>may have any value on entry to a subroutine</code>.</li>
<li style="line-height: 1.6em; margin-left: 25px; padding-left: 3px;">A function wants to know what FP exceptions its code triggers.</li>
<li style="line-height: 1.6em; margin-left: 25px; padding-left: 3px;">To know this, all FP exception bits must be unset.</li>
<li style="line-height: 1.6em; margin-left: 25px; padding-left: 3px;">According to your interpretation, this would require saving FPSR for later restoration.</li>
<li style="line-height: 1.6em; margin-left: 25px; padding-left: 3px;">According to your interpretation, this would make FPSR a callee-saved register.</li>
<li style="line-height: 1.6em; margin-left: 25px; padding-left: 3px;">According to your interpretation, this would make FPSR the only callee-saved register to be defined as such without explicitly labeling it so in the AArch64 PCS.</li>
</ul>
<p dir="auto" style="color: #28272d; margin: 0 0 16px;" align="initial">My interpretation of the quoted block is that the FPSR is cumulative across instructions until a function is called. That function is allowed to do whatever it wants with the FPSR including clear it because that's what any function that utilizes FP instructions will have to do to detect errors. Since FPSR is not explicitly labeled as callee-saved, the function has no need to restore its original value.</p>
<p dir="auto" style="color: #28272d; margin: 0;" align="initial">A register is either callee-saved or caller-saved. If the callee is allowed to return it with modifications (which your interpretation allows for), that makes it caller-saved.</p>
</div>


</div>
<div class="footer" style="margin-top: 10px;">
<p style="font-size: small; color: #737278;">

<br>
<a href="https://gitlab.rtems.org/rtems/rtos/rtems/-/issues/5214#note_119875">View it on GitLab</a>.
<br>
You're receiving this email because of your account on <a target="_blank" rel="noopener noreferrer" href="https://gitlab.rtems.org">gitlab.rtems.org</a>. <a href="https://gitlab.rtems.org/-/sent_notifications/a30cb702f486fe4da24cda8c1551c551/unsubscribe" target="_blank" rel="noopener noreferrer">Unsubscribe</a> from this thread · <a href="https://gitlab.rtems.org/-/profile/notifications" target="_blank" rel="noopener noreferrer" class="mng-notif-link">Manage all notifications</a> · <a href="https://gitlab.rtems.org/help" target="_blank" rel="noopener noreferrer" class="help-link">Help</a>
<script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","action":{"@type":"ViewAction","name":"View Issue","url":"https://gitlab.rtems.org/rtems/rtos/rtems/-/issues/5214#note_119875"}}</script>


</p>
</div>
</body>
</html>