Remix.run Logo
ethin 10 hours ago

So this makes me curious: is there a reason we don't do something like a __builtin_ct_begin()/__builtin_ct_end() set of intrinsics? Where the begin intrinsic begins a constant-time code region, and all code within that region must be constant-time, and that region must be ended with an end() call? I'm not too familiar with compiler intrinsics or how these things work so thought I'd ask. The intrinsic could be scoped such that the compiler can use it's implementation-defined behavior freedom to enforce the begin/end pairs. But Idk, maybe this isn't feasible?

zzo38computer 10 hours ago | parent [-]

Maybe it might be better to be implemented as a function attribute instead

ethin 9 hours ago | parent [-]

Or a pragma? Like how OpenMP did it?