<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On May 15, 2008, at 1:29 PM, Dale Johannesen wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><br>On May 15, 2008, at 1:24 PM, Duncan Sands wrote:<br><br><blockquote type="cite">Hi Dale,<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">are you saying that the declaration of objc_msgSend_fpret is wrong?<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">That sounds like the real problem to me. Having wrong declarations<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">is fatal. For example, suppose that the declaration was right: it<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">does return void. Then NOT performing the transform would be wrong,<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">because otherwise you will pop a float that shouldn't be popped...<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">Where is the declaration coming from?<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">That's the way the ObjC FE does things; it predates anyone working on<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">llvm, and has tendrils all over gcc. I don't like it either. In<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">theory I think you are right, but I doubt changing that is a <br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">practical<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">approach.<br></blockquote></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">I feel your pain :) Nonetheless, it would be better to fix this in <br></blockquote><blockquote type="cite">the<br></blockquote><blockquote type="cite">front-end if possible. Did you/Bill try and fail?<br></blockquote><br>Not really. But we, and Chris, have tried to change some of the other <br>weird things the ObjC FE does and always wound up having to back it out.<br></blockquote></div><br><div>In this case, the ObjC front-end is doing something bizarre, but ok. The issue here is that LLVM should be ok in the face of declarations that don't match their definitions. If we just see a call to a cast of a declaration, we shouldn't change the call (which determines the ABI) just because of a declaration. If the callee was a cast of a definition, changing it would be ok.</div><div><br class="webkit-block-placeholder"></div><div>One issue with <span class="Apple-style-span" style="color: rgb(84, 0, 0); ">objc_msgSend_fpret is that it is implemented in assembly, and thus has some magic semantics. I don't think there is an easy way to fix this in the frontend.</span></div><div><font class="Apple-style-span" color="#540000"><br class="webkit-block-placeholder"></font></div><div><font class="Apple-style-span" color="#540000">-Chris</font></div></body></html>