#Godbolt about why #amd64 #asm uses so many xor instructions
no real reason people on #amd64 use xor instead of sub to clear a register in #asm; both of them require zero micro-ops, merely renaming a register. #performance
#amd64 #asm instruction TZCNT or BSF counts the number of trailing zeroes. #bitmanip
on 02025-09-09Linux’s system-call #ABI differs from the standard #amd64 function-call ABI. “This means system-call wrapper functions can just set eax and run syscall instead of needing to do something like...” #asm
outline of #amd64 #ABI for #asm on Linux
on 02024-08-01some notes on the #amd64 SysV ABI register use
on 02024-06-30In #amd64 #asm you call the low 32 bits of a numbered register rNd, e.g., r8d, r11d, r15d. Writing to it clears the upper 32 bits, same as ecx vs. rcx. The low byte is rNb, I forget if there’s a name for the low 16 bits.
on 02024-06-30#x86 and #amd64 MOVZX instruction doesn't take an immediate argument. #asm
on 02023-07-03notes on #GDB and #position-independent executables and PC-relative lea on #amd64
the movabsq instruction in #amd64 is needed to load a 64-bit immediate
on 02022-09-16#amd64 and #i386 calling conventions
on 02022-09-16an #SSE widening dot-product operation in #X86/#amd64. With 128-bit operands, it does 8 16-bit multiplies and adds pairs of the 8 32-bit products to get 4 32-bit sums, which fit into the destination register.
on 02016-08-08DTrace hacker unhappy that the #amd64 #ABI doesn’t have frame pointers, resulting in inefficiency in unwinding the stack.
on 02016-07-24How stack unwinding works on the #amd64 #ABI, with .eh_frame and .debug_frame and whatnot.
on 02016-07-24128 bytes below %rsp on #amd64 is a “red zone” of scratch space, making the standard amd64 #abi unusable for code that has to handle interrupts.
on 02015-11-11