News for hackers. Stuff that matters.

pgrad3

Re:4D toys on Saturday August 04, 2018 @04:19PM (#17688287)
The article describing blind people getting vision again: https://www.google.com/amp/s/www.newyorker.com/tech/elements...
Re:Rust's integer intrinsics are impressive on Saturday June 10, 2017 @06:25AM (#14526847)
Correction: rsp and rbp are 64-bit registers storing 64-bit stack memory addresses, while popcount eax, edi is taking the 32-bit parameter as input and returning the 32-bit return value. The calling convention is x64 C.
Re:Rust's integer intrinsics are impressive on Saturday June 10, 2017 @06:13AM (#14526821)
It's a function invocation following x86 C calling convention in assembly. push ebp pushes the base stack pointer of the caller of count() onto the stack, and mov ebp, esp sets the base stack pointer for the callee count(). pop ebp pops the base stack pointer and ret pops the return address into the program counter. count_ones() is replaced with its assembly counterpart, which stores the result in return register eax. This is as optimized as count() as a user-created function can be in assembly given the calling convention. https://en.m.wikipedia.org/wiki/X86_calling_conventions