News for hackers. Stuff that matters.
Re:WASM Is the New CGI by jeberle on Thursday October 10, 2024 @01:43PM (#41801289)
CPU instruction sets do account for signed vs unsigned integers. SHR vs SAR for example. It's part of the ISAs. I'm calling this out as AFAIK, the JVM has no support for unsigned ints and so that in turn makes WASM a little more compelling.

https://en.wikibooks.org/wiki/X86_Assembly/Shift_and_Rotate

Re:WASM Is the New CGI by kaba0 on Thursday October 10, 2024 @04:46PM (#41803407)
Well, it has compiler intrinsics for unsigned numbers, for what it’s worth.
Re:WASM Is the New CGI by flohofwoe on Saturday October 12, 2024 @06:00AM (#41817940)
Yes some instructions do - but surprisingly few (for instance there's signed/unsigned mul/div instructions, but add/sub are 'sign-agnostic'). The important part is that any 'signedness' is associated with the operation, and not with the operands or results.