<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"><channel><title>mikeash.com pyblog/friday-qa-2012-11-16-lets-build-objc_msgsend.html comments</title><link>http://www.mikeash.com/?page=pyblog/friday-qa-2012-11-16-lets-build-objc_msgsend.html#comments</link><description>mikeash.com Recent Comments</description><lastBuildDate>Sat, 05 Sep 2026 07:49:08 GMT</lastBuildDate><generator>PyRSS2Gen-1.0.0</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>no name field sorry - 2024-10-12 22:05:10</title><link>http://www.mikeash.com/?page=pyblog/friday-qa-2012-11-16-lets-build-objc_msgsend.html#comments</link><description>it's insane we have amazing articles like this for free!</description><guid isPermaLink="true">dc8bdb827b52cd652f0bdce70449e079</guid><pubDate>Sat, 12 Oct 2024 22:05:10 GMT</pubDate></item><item><title>Yue Wang - 2013-07-15 20:57:58</title><link>http://www.mikeash.com/?page=pyblog/friday-qa-2012-11-16-lets-build-objc_msgsend.html#comments</link><description>unused is for better memory alignment (serve as padding). </description><guid isPermaLink="true">7e8f7d2e15d79a63a000036b40dcd30d</guid><pubDate>Mon, 15 Jul 2013 20:57:58 GMT</pubDate></item><item><title>Nicolas VERINAUD - 2013-02-04 15:18:07</title><link>http://www.mikeash.com/?page=pyblog/friday-qa-2012-11-16-lets-build-objc_msgsend.html#comments</link><description>Here is the official source code for the assembly part behind objc messaging (for arm): &lt;a href="https://github.com/bavarious/objc4/blob/master/runtime/Messengers.subproj/objc-msg-arm.s"&gt;https://github.com/bavarious/objc4/blob/master/runtime/Messengers.subproj/objc-msg-arm.s&lt;/a&gt;
&lt;br /&gt;
&lt;br /&gt;Enjoy ! :P</description><guid isPermaLink="true">79416b6655aac05f28b82f7371fc4226</guid><pubDate>Mon, 04 Feb 2013 15:18:07 GMT</pubDate></item><item><title>SlashFX - 2012-12-06 03:41:00</title><link>http://www.mikeash.com/?page=pyblog/friday-qa-2012-11-16-lets-build-objc_msgsend.html#comments</link><description>Thanks for all your articles. They've been a big help!</description><guid isPermaLink="true">5ad3e13560c49a2fb11176eddd6b4a4d</guid><pubDate>Thu, 06 Dec 2012 03:41:00 GMT</pubDate></item><item><title>mikeash - 2012-11-21 15:18:08</title><link>http://www.mikeash.com/?page=pyblog/friday-qa-2012-11-16-lets-build-objc_msgsend.html#comments</link><description>The iOS simulator uses i386 so you'll need to follow those rules for parameter passing and returning. Unfortunately, i386 passes parameters completely differently. Due to the relative lack of registers, it does all parameter passing on the stack, so you'll have to take a rather different approach to building the trampoline there. For more information on just how the parameter passing works, Apple spells out their i386 ABI here:
&lt;br /&gt;
&lt;br /&gt;&lt;a href="https://developer.apple.com/library/mac/#documentation/developertools/conceptual/LowLevelABI/130-IA-32_Function_Calling_Conventions/IA32.html#//apple_ref/doc/uid/TP40002492-SW4"&gt;https://developer.apple.com/library/mac/#documentation/developertools/conceptual/LowLevelABI/130-IA-32_Function_Calling_Conventions/IA32.html#//apple_ref/doc/uid/TP40002492-SW4&lt;/a&gt;</description><guid isPermaLink="true">7930c3f67356a76b47a95992b8776c63</guid><pubDate>Wed, 21 Nov 2012 15:18:08 GMT</pubDate></item><item><title>iSofTom - 2012-11-21 10:51:57</title><link>http://www.mikeash.com/?page=pyblog/friday-qa-2012-11-16-lets-build-objc_msgsend.html#comments</link><description>Thanks a lot for this great article! I am trying to do the same thing for the iOS simulator, but having trouble to find out the right registers. Any clues or links ?</description><guid isPermaLink="true">c76165482311364bbfab058e158df116</guid><pubDate>Wed, 21 Nov 2012 10:51:57 GMT</pubDate></item><item><title>Simon Strandgaard - 2012-11-18 13:38:06</title><link>http://www.mikeash.com/?page=pyblog/friday-qa-2012-11-16-lets-build-objc_msgsend.html#comments</link><description>Awesome explanation. It's been ages I have coded any assembler. Nice.</description><guid isPermaLink="true">c3bba371cf1778a83ae3ce4067663c1b</guid><pubDate>Sun, 18 Nov 2012 13:38:06 GMT</pubDate></item><item><title>mikeash - 2012-11-17 01:22:40</title><link>http://www.mikeash.com/?page=pyblog/friday-qa-2012-11-16-lets-build-objc_msgsend.html#comments</link><description>&lt;b&gt;Vasi:&lt;/b&gt; You're right, of course. I was concentrating on my guarantees as the caller and completely forgot about my responsibilities as the callee. I've updated the code to save and restore r12. Thanks for pointing that out.</description><guid isPermaLink="true">26b9a9437d9b8fe4baf57c90bc229ac9</guid><pubDate>Sat, 17 Nov 2012 01:22:40 GMT</pubDate></item><item><title>Vasi - 2012-11-16 20:27:54</title><link>http://www.mikeash.com/?page=pyblog/friday-qa-2012-11-16-lets-build-objc_msgsend.html#comments</link><description>Thanks for the detailed article! I think your use of %r12 isn't safe though, according to the ABI spec it's supposed to be callee-saved.</description><guid isPermaLink="true">987717086ee47c7f4d433178c72697f5</guid><pubDate>Fri, 16 Nov 2012 20:27:54 GMT</pubDate></item><item><title>Steve Weller - 2012-11-16 16:16:00</title><link>http://www.mikeash.com/?page=pyblog/friday-qa-2012-11-16-lets-build-objc_msgsend.html#comments</link><description>For better compatibility with real life, I'd add a test for nil self so that messaging nil does nothing rather than crash.</description><guid isPermaLink="true">b2afb52e5231b43410a4a054a0aba0b8</guid><pubDate>Fri, 16 Nov 2012 16:16:00 GMT</pubDate></item></channel></rss>
