<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
span.EmailStyle18
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal" style="margin-left:.5in"><b>From:</b> Hesham Almatary <heshamelmatary@gmail.com>
<br>
<b>Sent:</b> Thursday, October 22, 2020 14:51<br>
<b>To:</b> Kinsey Moore <kinsey.moore@oarcorp.com><br>
<b>Cc:</b> devel@rtems.org<br>
<b>Subject:</b> Re: [PATCH] score/aarch64: Size saved SP register for ABI<o:p></o:p></p>
</div>
<p class="MsoNormal" style="margin-left:.5in"><o:p> </o:p></p>
<div>
<p class="MsoNormal" style="margin-left:.5in"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal" style="margin-left:.5in">On Thu, 22 Oct 2020 at 20:07, Kinsey Moore <<a href="mailto:kinsey.moore@oarcorp.com">kinsey.moore@oarcorp.com</a>> wrote:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<p class="MsoNormal" style="margin-left:.5in">This ensures that the saved SP register is sized appropriately depending<br>
on the chosen ABI and prevents a warning in the libmisc stack checker.<br>
---<br>
cpukit/score/cpu/aarch64/include/rtems/score/cpu.h | 5 ++++-<br>
1 file changed, 4 insertions(+), 1 deletion(-)<br>
<br>
diff --git a/cpukit/score/cpu/aarch64/include/rtems/score/cpu.h b/cpukit/score/cpu/aarch64/include/rtems/score/cpu.h<br>
index da2140a2a8..b33f6a1c85 100644<br>
--- a/cpukit/score/cpu/aarch64/include/rtems/score/cpu.h<br>
+++ b/cpukit/score/cpu/aarch64/include/rtems/score/cpu.h<br>
@@ -489,7 +489,10 @@ typedef struct {<br>
#ifdef AARCH64_MULTILIB_ARCH_V8_ILP32<br>
uint32_t _register_lr_top;<br>
#endif<br>
- uint64_t register_sp;<br>
+ uintptr_t register_sp;<br>
+#ifdef AARCH64_MULTILIB_ARCH_V8_ILP32<br>
+ uint32_t _register_sp_top;<o:p></o:p></p>
</blockquote>
<div>
<p class="MsoNormal" style="margin-left:.5in">Won’t uintptr_t work here (and for all of the other integer registers) as well and consequently we get rid of all of such multiarch ifdefs?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">It doesn’t get rid of the multiarch ifdefs, it would just move them to the offsets #define block above and into the assembly for generating the stack frame. I’d much rather have the exception frame be a static size and avoid adjusting the
assembly and offsets based on ABI since from the machine’s perspective it’s still a 64bit pointer even if C and C++ view it as a 32bit pointer.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Kinsey<o:p></o:p></p>
</div>
</div>
</div>
</div>
</body>
</html>