<div dir="ltr"><div>I also tried to separate i386 from x86_64, but it seemed a bit unnecessary since the only real difference is the register sets.</div><div><br></div><div>The <font face="monospace, monospace">m_gpr_x86_64</font> does bother me a bit too, but I imagine <font face="monospace, monospace">k_num_gpr_registers_x86_64 >= k_num_gpr_registers_i386</font> would always be true, and we should probably always use <font face="monospace, monospace">GetRegisterInfoInterface().GetGPRSize()</font> instead of <font face="monospace, monospace">sizeof</font>.</div><div><br></div><div>How does this look instead?</div><div><br></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><font face="monospace, monospace">union {</font></div></blockquote><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><font face="monospace, monospace">uint64_t m_gpr_i386[k_num_gpr_registers_i386];<br></font></div><div><font face="monospace, monospace">uint64_t m_gpr_x86_64[k_num_gpr_registers_x86_64];<br></font></div></blockquote></blockquote><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><font face="monospace, monospace">} </font><span style="font-family:monospace,monospace">m_gpr</span><span style="font-family:monospace,monospace">;</span></div></blockquote><div><br></div><div>In any case, let's get some more opinions on this first.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Feb 16, 2015 at 11:14 AM, Tamas Berghammer <span dir="ltr"><<a href="mailto:tberghammer@google.com" target="_blank">tberghammer@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Previously the "uint64_t m_gpr_x86_64[k_num_gpr_registers_x86_64];" variable was used to store the value of the gpr registers for both x86 and for x64 contexts what isn't a problem until k_num_gpr_registers_x86_64 >= k_num_gpr_registers_i386 (currently true) and we don't use sizeof on it but I think it is a bit of a design flow.<br>
If your fix for the debug registers will go in then this CL only contains the separation.<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
<a href="http://reviews.llvm.org/D7667" target="_blank">http://reviews.llvm.org/D7667</a><br>
<br>
EMAIL PREFERENCES<br>
  <a href="http://reviews.llvm.org/settings/panel/emailpreferences/" target="_blank">http://reviews.llvm.org/settings/panel/emailpreferences/</a><br>
<br>
<br>
</div></div></blockquote></div><br></div>