Question about m4 in .asm files
David Sparks
sparks05 at proton.me
Fri Feb 13 22:08:04 CET 2026
I notice that, in the .asm files, the arguments to IFDOS() are
sometimes `singly quoted', and sometimes ``doubly quoted''.
For example, mpn/x86_64/mul_1.asm contains:
IFDOS(` define(`up', ``%rsi'') ') dnl
IFDOS(` define(`rp', ``%rcx'') ') dnl
IFDOS(` define(`vl', ``%r9'') ') dnl
IFDOS(` define(`r9', ``rdi'') ') dnl
IFDOS(` define(`n', ``%r8'') ') dnl
IFDOS(` define(`r8', ``r11'') ') dnl
ASM_START()
TEXT
ALIGN(16)
PROLOGUE(mpn_mul_1c)
IFDOS(``push %rsi '')
IFDOS(``push %rdi '')
IFDOS(``mov %rdx, %rsi '')
push %rbx
IFSTD(` mov %r8, %r10')
IFDOS(` mov 64(%rsp), %r10') C 40 + 3*8 (3 push insns)
jmp L(common)
EPILOGUE()
It's obvious why the second arguments to define() are doubly
quoted; the goal is replace n -> %r8 and %r8 -> %r11, but not
n -> %r8 -> %r11.
But in the actual code, there's no obvious rhyme or reason to the
double quoting. Why double-quote "mov %eds,%rsi" but not "mov %r8,%r10"?
Is it just a harmless error that's been propagated by cut & paste, or
is there some rationale I'm not seeing?
Thank you.
More information about the gmp-devel
mailing list