This is the first time I learned about eiz. Cool trick!
What’s eiz: https://stackoverflow.com/a/2553556/3125367
What’s eiz: https://stackoverflow.com/a/2553556/3125367
This appears to be some GNU-specific syntax meaning "encode SIB byte with no index register". The only case where this would be required by the hardware is when using ESP/RSP as a base register, and every assembler should produce the correct encoding for that if you simply write [ESP].
So using "eiz" on GAS lets you control what is put into the (unused) scale field. One might call that a feature, but it is a meaningless encoding detail similar to which variant of "register to register" opcodes is emitted, something that I don't think any assembler gives you control over.
¹ except maybe on the microarchitectural level, but that isn't visible to the programmer
lea rax, [eiz+rbx*4]
instead of lea rax, [rbx*4]
because the latter will produce an heavier binary by being interpreted as lea rax, [00000000h+rbx*4]