DeVault: Announcing the Hare programming language
DeVault: Announcing the Hare programming language
Posted May 5, 2022 13:08 UTC (Thu) by wtarreau (subscriber, #51152)In reply to: DeVault: Announcing the Hare programming language by khim
Parent article: DeVault: Announcing the Hare programming language
Ah no, sorry for not being clear. I have to use asm statements to prevent the compiler from being smart!
Typically stuff like this that current compilers are not yet able to optimize away to produce stupid code :
#define GUESSWHAT(v) ({ typeof(v) _v; asm volatile("" : "=rm"(_v) : "0"(_v)); _v; })
It usually only costs a move or two due to register allocation, so it's cheap. And using that in high-level code is ugly. But at least it doesn't know my pointer's value and doesn't play games in my back with it.
