Is it possible to capture the carry flag from an x86 SHL/SHR/SAR instruction in C, without inline assembly?
I couldn't find any intrinsic for shifts, and it doesn't seem like compilers pick up patterns where it would be used.
Suppose I want the following:
shr eax, cl ; eax >>= cl
adc ebx, edx ; ebx += edx + shifted_out_bit
What C code could I write that would likely get a compiler to generate that sort of output?