Experimental browser for the Atmosphere
Using C++23's deducing `this` to pass-by-copy is proving extremely useful for inline thumb16 assembly The `LDM` and `STM` instructions write back to the address register, so a const will be mutated: forcing pass-by-copy and admitting to the compiler "this will be mutated" gives optimal output […]
Jan 3, 2025, 3:02 PM
{ "cid": "bafyreiaobuzxhaeqcvqjnlmp5t33xoktppqy2dijqtctkh2u6u6udf5jra", "uri": "at://did:plc:f66dkdmphqw54y5wovv4j5z3/app.bsky.feed.post/3letucpct5su2", "value": { "$type": "app.bsky.feed.post", "bridgyOriginalText": "<p>Using C++23's deducing <code>this</code> to pass-by-copy is proving extremely useful for inline thumb16 assembly<br>The <code>LDM</code> and <code>STM</code> instructions write back to the address register, so a const will be mutated: forcing pass-by-copy and admitting to the compiler \"this will be mutated\" gives optimal output</p><p>Means I get non-tearing 64-bit integer ops for my types on armv4t</p>", "bridgyOriginalUrl": "https://retrodev.social/@xilefian/statuses/01JGPB0B7X8ANP3AN6AXNEG7FQ", "createdAt": "2025-01-03T15:02:10.000Z", "embed": { "$type": "app.bsky.embed.external", "external": { "$type": "app.bsky.embed.external#external", "description": "", "title": "Original post on retrodev.social", "uri": "https://retrodev.social/@xilefian/statuses/01JGPB0B7X8ANP3AN6AXNEG7FQ" } }, "langs": [ "en" ], "text": "Using C++23's deducing `this` to pass-by-copy is proving extremely useful for inline thumb16 assembly\nThe `LDM` and `STM` instructions write back to the address register, so a const will be mutated: forcing pass-by-copy and admitting to the compiler \"this will be mutated\" gives optimal output […]" } }