Yeah, even with assembly, your timing guarantees are limited on modern architectures. But if you REALLY need something specific from the machine, that's where you go.
Even most managed languages provide a way to get down into Assembly dumps from their AOT and JIT compiler toolchains.
Maybe we need some TikTok videos showing how to do such workflows.
If you are doing really low level stuff, sometimes it’s worth rolling out your own little RTOS with just the bits and pieces you need.
Not that long ago, I realised most 8-bit (and MS-DOS) computer games had their own RTOS woven into the game code, with multi-tasking, hardware management, IO, and so on.
CPUs are actually much better at making those guarantees than compilers are.
https://lore.kernel.org/all/851920c5-31c9-ddd9-3e2d-57d379aa...
In other words, they have announced the possibility of breaking that guarantee years before touching it, which is something the clang developers would never do.
This notion is not expressible in most (or almost all) high-level programming languages. Or, to put it another way: If you wrote C or C++ you never mean to say "perform this guaranteed-constant-time CPU operation" (ignoring asm instructions and hardware-aware builtins).
You need a language where you can express what you actually meant, which in this case is "Perform this constant time operation". Having expressed what you meant, now everybody between you and the hardware can co-operate to potentially deliver that.
So long as you write C (or C++) you're ruined, you cannot express what you meant, you are second guessing the compiler authors instead.