I need to divide an unsigned 128-Bit number on a 64-Bit Processor at the Register rdx:rax with a 64-Bit divisor in rdi. The lower Bits are in raxand the higher ones in rdx.
However the DIV-Instruction only supports 64/64 Bit divisions.
My approach was to save rax, the lower Bits of the number, in another Register and left-shift the Bits from the rdx-Register bitwise into rax to perform a long division with rdi. And save the computational steps in another Register to build up the solution Step-by-Step.
But I think there has to be a more efficient approach. Are there instruction which support this kind of calculations between several Registers?