News for hackers. Stuff that matters.
Re:New integer types I’d like to see by chrisseaton on Friday September 30, 2022 @01:14PM (#33037620)
That’s bizarre - it jumps on not overflow? And jumps forward? But that’s statically predicted not-taken - it’ll statically mispredict and stall the processor every time!
Re:New integer types I’d like to see by magicalhippo on Friday September 30, 2022 @04:32PM (#33040406)
My gut feeling says this is due to FreePascal supporting platforms[1] that only has short conditional jumps (-128 to +127 bytes), like i8086[2]. The alternative on those platforms would be a unconditional jump after the conditional, to jump over the call to the error handler.

On i8086 at least a non-taken conditional jump is 4 cycles while a unconditional jump is 15, for a total of 19 cycles, while a taken conditional jump is only 16. So it makes sense to almost always take the conditional jump.

[1]: https://wiki.freepascal.org/Free_Pascal_supported_targets

[2]: https://edge.edx.org/c4x/BITSPilani/EEE231/asset/8086_family... (page 2-45, or 60 in the PDF)

[3]: page 2-58 in[2] or 73 in the PDF

Re:New integer types I’d like to see by mikewarot on Friday September 30, 2022 @03:24PM (#33039517)
It's the way that error handling is done in Free Pascal. I've never worried about the code it generates before, I just care about correct results. Yeah, it could be better.