For a good list of op codes, checkout:


For an online assembler, checkout:



For a good list of linux system calls, refer:


class ppci.arch.x86_64.X86_64Arch(options=None)

x86_64 architecture

Given a set of argument types, determine locations
the first arguments go into registers. The others on the stack.

see also http://www.x86-64.org/documentation/abi.pdf

ABI: p1 = rdi p2 = rsi p3 = rdx p4 = rcx p5 = r8 p6 = r9

floating point values are passed in xmm0, xmm1, xmm2, xmm3, etc..

return value in rax

self.rv = rax

On windows a different scheme is used: integers are passed in rcx, rdx, r8 and r9 floats are passed in xmm0, xmm1, xmm2 and xmm3

These examples show how it works:

func(int a, double b, int c, float d) // a in rcx, b in xmm1, c in r8 and d in xmm3


return value in rax or xmm0

gen_call(frame, label, args, rv)

This function moves arguments in the proper locations.


Return epilogue sequence for a frame. Adjust frame pointer and add constant pool


Copy arguments into local temporaries and mark registers live

gen_memcpy(dst, src, count)

Generate a memcpy action


Returns prologue instruction sequence

get_reloc_type(reloc_type, symbol)

Get the reloc type for ELF format.

move(dst, src)

Generate a move from src to dst