<div>Since this is what I believe is a custom attribute, to make sure we are on the same page, the vecreturn attribute is described as follows in our gcc doc:</div>
<div> </div>
<div>***</div>
<div>Returning a Vector Class in Registers<br>  <br>According to the PPU ABI specifications, a class with a single member of vector type is returned in<br>memory when used as the return value of a function. This results in inefficient code when implementing<br>
vector classes. To return the value in a single vector register, add the vecreturn attribute to the class<br>definition. This attribute is also applicable to struct types.<br>  <br>Example:<br>  <br>struct Vector<br>{<br>
  __vector float xyzw;<br>} __attribute__((vecreturn));<br>  <br>Vector Add(Vector lhs, Vector rhs)<br>{<br>  Vector result;<br>  result.xyzw = vec_add(lhs.xyzw, rhs.xyzw);<br>  return result; // This will be returned in a register<br>
}<br>***</div>
<div> </div>
<div>I believe I should be doing a little more checking to make sure the structure/class to which the vecreturn attribute is attached is of the proper kind, i.e. only has one data member, and the member is a vector.</div>

<div> </div>
<div>Is the enclosed patch the right way to do this checking, using the field iterator?</div>
<div> </div>
<div>If so, may I check it in?  Otherwise, please let me know the right way to do it.</div>
<div> </div>
<div>-John</div>
<div><br>-- <br>John Thompson<br><a href="mailto:John.Thompson.JTSoftware@gmail.com">John.Thompson.JTSoftware@gmail.com</a><br><br></div>