3 ms·
Suppose you wrote a kernel in rust. Now there has been a CPU regression and you have to implement a retpoline. Obviously you don't want to implement it in pla
by throwawaymaths 4y ago
Suppose you wrote a kernel in rust. Now there has been a CPU regression and you have to implement a retpoline. Obviously you don't want to implement it in places where you don't have to. Would this be easy? Or hard?
- junon 4y agoI don't see why it would be any more difficult or cumbersome than in C.
- throwawaymaths 4y agoBecause macros can obscure having an accurate mental model of what is happening at the metal level, which is what matters when you're doing a retpoline. This is why ziglang, for example, has "no hidden control flow". Not only the mental model, but also you might find that where you need to add the code forces you to break open a macro, which could be a considerable refactoring task.
- junon 4y agoI don't see what macros have anything to do with anything.