herumi / xbyak

A JIT assembler for x86/x64 architectures supporting MMX, SSE (1-4), AVX (1-2, 512), FPU, APX, and AVX10.2
BSD 3-Clause "New" or "Revised" License
2.05k stars 278 forks source link

Why addressing do not support scale * index form. #111

Closed CaoZhongZ closed 4 years ago

CaoZhongZ commented 4 years ago

Any reason why xbyak do not support form like:

lea(r9, ptr[rdi + 4 * r15]);

And must using

lea(r9, ptr[rdi + r15 * 4]);

I'm transforming some assembly to xbyak jit, it is painful to adjust too many order of scale and index.

herumi commented 4 years ago

Any reason why xbyak do not support form like:

Because nobody did want the feature.

it is painful to adjust too many order of scale and index.

I see. I'll support the feature.

CaoZhongZ commented 4 years ago

Thanks for the reply! I was just afraid that there might be consequence if overload operator* for it, if there isn't, support the other order would make transform script easier. 😄

herumi commented 4 years ago

I've supported it. https://github.com/herumi/xbyak/commit/1f119a04ac5d6b5555a16af4398dcec47adaab8e

CaoZhongZ commented 4 years ago

Thanks!