Home | Notifications | New Note | Local | Federated | Search | Logout
Note Detail
Reply to @koakuma@uwu.social
David Chisnall (*Now with 50% more sarcasm!*)@david_chisnall@infosec.exchange (2026-08-17 01:53:18)
@koakuma
SPARC had a few things for working with Smalltalk-like tagged integers. I wonder if Smalltalk on SPARC used this. You could load the values unconditionally early on in a function and then use them after the tag checks.
---Reply---
Sun Microdevil Pte Ltd@koakuma@uwu.social (2026-08-17 02:20:53)
@david_chisnall The latter part is exactly how the v9 ISA book recommends it to be used (though it uses branches as an example), if my memory serves me right
I dunno how much of an impact it would have on modern heavily-optimizing implementations, though, in particular because those things would already speculate the loads anyway, no?
Reply
---Replies---
Sun Microdevil Pte Ltd@koakuma@uwu.social (2026-08-17 02:29:46)
@david_chisnall Also I just noticed that you can (somewhat hackily) impleement a `ptr ? *ptr : default` with like
ld [ptr] #ASI_PNF, val
movrz ptr, default, val
But idk how much of an improvement would this be over just letting the predictor speculate the ptr != NULL case (hopefully NULLs would be rare, wouldn't they?)