SIB Byte ┌────────────────────────────────────────────────────────────────────────────────────────────────────────┐ │ │ │REX.B │ │───────────────────────────────────┼───────────────────────────────┼────────────────────────────────────│ │r64 │RAX│RCX│RDX│RBX│RSP│→^1│RSI│RDI│R8 │R9 │R10 │R11 │R12 │→^2│R14 │R15 │ │r32 │EAX│ECX│EDX│EBX│ESP│→^1│ESI│EDI│R8D│R9D│R10D│R11D│R12D│→^2│R14D│R15D│ │BASE │000│001│002│003│004│005│006│007│000│001│002 │003 │004 │005│006 │007 │ │───────────────────────────────────┼───────────────────────────────┼────────────────────────────────────│ │Scaled Index│Scaled Index│Sca│Index│Value of SIB Byte │Value of SIB Byte │ │ │REX.X │ │ │ │ │ │────────────┼────────────┼───┼─────┼───────────────────────────────┼────────────────────────────────────│ │(rax,eax) │(r8,r8d) │000│000 │000│001│002│003│004│005│006│007│000│001│002 │003 │004 │005│006 │007 │ │(rcx,ecx) │(r9,r9d) │ │010 │010│011│012│013│014│015│016│017│010│011│012 │013 │014 │015│016 │017 │ │(rdx,edx) │(r10,r10d) │ │020 │020│021│022│023│024│025│026│027│020│021│022 │023 │024 │025│026 │027 │ │(rbx,ebx) │(r11,r11d) │ │030 │030│031│032│033│034│035│036│037│030│031│032 │033 │034 │035│036 │037 │ │none │(r12,r12d) │ │040 │040│041│042│043│044│045│046│047│040│041│042 │043 │044 │045│046 │047 │ │(rbp,ebp) │(r13,r13d) │ │050 │050│051│052│053│054│055│056│057│050│051│052 │053 │054 │055│056 │057 │ │(rsi,esi) │(r14,r14d) │ │060 │060│061│062│063│064│065│066│067│060│061│062 │063 │064 │065│066 │067 │ │(rdi,edi) │(r15,r15d) │ │070 │070│071│072│073│074│075│076│077│070│071│072 │073 │074 │075│076 │077 │ │────────────┼────────────┼───┼─────┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼────┼────┼────┼───┼────┼────│ │(rax,eax,2) │(r8,r8d,2) │100│000 │100│101│102│103│104│105│106│107│100│101│102 │103 │104 │105│106 │107 │ │(rcx,ecx,2) │(r9,r9d,2) │ │010 │110│111│112│113│114│115│116│117│110│111│112 │113 │114 │115│116 │117 │ │(rdx,edx,2) │(r10,r10d,2)│ │020 │120│121│122│123│124│125│126│127│120│121│122 │123 │124 │125│126 │127 │ │(rbx,ebx,2) │(r11,r11d,2)│ │030 │130│131│132│133│134│135│136│137│130│131│132 │133 │134 │135│136 │137 │ │none │(r12,r12d,2)│ │040 │140│141│142│143│144│145│146│147│140│141│142 │143 │144 │145│146 │147 │ │(rbp,ebp,2) │(r13,r13,2) │ │050 │150│151│152│153│154│155│156│157│150│151│152 │153 │154 │155│156 │157 │ │(rsi,esi,2) │(r14,r14d,2)│ │060 │160│161│162│163│164│165│166│167│160│161│162 │163 │164 │165│166 │167 │ │(rdi,edi,2) │(r15,r15d,2)│ │070 │170│171│172│173│174│175│176│177│170│171│172 │173 │174 │175│176 │177 │ │────────────┼────────────┼───┼─────┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼────┼────┼────┼───┼────┼────│ │(rax,eax,4) │(r8,r8d,4) │200│000 │200│201│202│203│204│205│206│207│200│201│202 │203 │204 │205│206 │207 │ │(rcx,ecx,4) │(r9,r9d,4) │ │010 │210│211│212│213│214│215│216│217│210│211│212 │213 │214 │215│216 │217 │ │(rdx,edx,4) │(r10,r10d,4)│ │020 │220│221│222│223│224│225│226│227│220│221│222 │223 │224 │225│226 │227 │ │(rbx,ebx,4) │(r11,e11d,4)│ │030 │230│231│232│233│234│235│236│237│230│231│232 │233 │234 │235│236 │237 │ │none │(r12,r12d,4)│ │040 │240│241│242│243│244│245│246│247│240│241│242 │243 │244 │245│246 │247 │ │(rbp,ebp,4) │(r13,r13d,4)│ │050 │250│251│252│253│254│255│256│257│250│251│252 │253 │254 │255│256 │257 │ │(rsi,esi,4) │(r14,r14d,4)│ │060 │260│261│262│263│264│265│266│267│260│261│262 │263 │264 │265│266 │267 │ │(rdi,edi,4) │(r15,r15d,4)│ │070 │270│271│272│273│274│275│276│277│270│271│272 │273 │274 │275│276 │277 │ │────────────┼────────────┼───┼─────┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼────┼────┼────┼───┼────┼────│ │(rax,eax,8) │(r8,r8d,8) │300│000 │300│301│302│303│304│305│306│307│300│301│302 │303 │304 │305│306 │307 │ │(rcx,ecx,8) │(r9,r9d,8) │ │010 │310│311│312│313│314│315│316│317│310│311│312 │313 │314 │315│316 │317 │ │(rdx,edx,8) │(r10,r10d,8)│ │020 │320│321│322│323│324│325│326│327│320│321│322 │323 │324 │325│326 │327 │ │(rbx,ebx,8) │(r11,r11d,8)│ │030 │330│331│332│333│334│335│336│337│330│331│332 │333 │334 │335│336 │337 │ │none │(r12,r12d,8)│ │040 │340│341│342│343│344│345│346│347│340│341│342 │343 │344 │345│346 │347 │ │(rbp,ebp,8) │(r13,r13d,8)│ │050 │350│351│352│353│354│355│356│357│350│351│352 │353 │354 │355│356 │357 │ │(rsi,esi,8) │(r14,r14d,8)│ │060 │360│361│362│363│364│365│366│367│360│361│362 │363 │364 │365│366 │367 │ │(rdi,edi,8) │(r15,r15d,8)│ │070 │370│371│372│373│374│375│376│377│370│371│372 │373 │374 │375│376 │377 │ └────────────────────────────────────────────────────────────────────────────────────────────────────────┘ SIB Note 1 SIB Note 2 ┌───────────────────────┐ ┌────────────────────────┐ │Mod bits│base │ │Mod bits│base │ │────────┼──────────────│ │────────┼───────────────│ │00 │disp32 │ │00 │disp32 │ │────────┼──────────────│ │────────┼───────────────│ │01 │RBP/EBP+disp8 │ │01 │R13/R13D+disp8 │ │────────┼──────────────│ │────────┼───────────────│ │10 │RBP/EBP+disp32│ │10 │R13/R13D+disp32│ └───────────────────────┘ └────────────────────────┘