Contents

Assembly

Instruction Set Architecture

representation

LLVMIntelMeaning
COMMONDqcommand qword ptrqword (64bit)

divl

OpcodeInstructionOp/En64-Bit ModeCompat/Leg ModeDescription
F6 /6DIV r/m8MValidValidUnsigned divide AX by r/m8, with result stored in AL := Quotient, AH := Remainder.
REX + F6 /6DIV r/m81MValidN.E.Unsigned divide AX by r/m8, with result stored in AL := Quotient, AH := Remainder.
F7 /6DIV r/m16MValidValidUnsigned divide DX:AX by r/m16, with result stored in AX := Quotient, DX := Remainder.
F7 /6DIV r/m32MValidValidUnsigned divide EDX:EAX by r/m32, with result stored in EAX := Quotient, EDX := Remainder.
REX.W + F7 /6DIV r/m64MValidN.E.Unsigned divide RDX:RAX by r/m64, with result stored in RAX := Quotient, RDX := Remainder.
  • dividend: [%edx (high 32 bit), %eax (low 32 bit)]
  • divisor: operand
  • remainder: [%edx (high 32 bit), %eax (low 32 bit)]
  • quotient: rax

AT&T – Intel

syntax

IntelAT&T
Comments;//
InstructionsUntagged addTagged with operand sizes: addq
Registerseax, ebx, etc.%eax,%ebx, etc.
Immediates0x100$0x100
Indirect[eax](%eax)
General indirect[base + reg + reg * scale + displacement]displacement(reg, reg, scale)

prefix

Intex SyntaxAT&T Syntax
mov eax,1movl $1,%eax
mov ebx,0ffhmovl $0xff,%ebx
int 80hint $0x80

direction

Intex SyntaxAT&T Syntax
instr dest,sourceinstr source,dest
mov eax,[ebx+3]movl 3(%ebx),%eax

gdb

1
set disassembly-flavor att/intel

objdump

1
objdump -M intel