News for hackers. Stuff that matters.
Re:Qnice – An Elegant 16 Bit Processor by titzer on Thursday March 12, 2020 @11:21PM (#22564432)
I really like conditional subroutine calls. I wish x86 had them. It makes it really easy to inline a fastpath of some safety check (e.g. nullcheck, bounds check, write barrier, etc), and have the slowpath be factored out to a common place. What PL implementations like the JVM, JavaScript engines, etc typically have to do without this is they insert a conditional branch to "deferred code" which is at the end of the function (statically predicted not-taken), but that deferred code can't be shared, because it needs to branch back to the mainline code. That costs code size. A conditional subroutine call is exactly the right mechanism to solve this!
Re:Qnice – An Elegant 16 Bit Processor by aparashk on Thursday March 12, 2020 @11:32PM (#22564484)
Can’t agree more!