Apple Microarchitecture Research by Dougall Johnson

M1/A14 P-core (Firestorm): Overview | Base Instructions | SIMD and FP Instructions
M1/A14 E-core (Icestorm):  Overview | Base Instructions | SIMD and FP Instructions

UBFX (64-bit)

Test 1: uops

Code:

  ubfx x0, x0, #3, #7
  mov x0, 1
  mov x1, 2

(no loop instructions)

1000 unrolls and 1 iteration

Retires: 1.000

Issues: 1.000

Integer unit issues: 1.000

Load/store unit issues: 0.000

SIMD/FP unit issues: 0.000

retire uop (01)cycle (02)033f4d51schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)606d6emap stall dispatch (70)map rewind (75)map stall (76)dispatch uop (78)map int uop (7c)map int uop inputs (7f)8283flush restart other nonspec (84)85inst all (8c)inst int alu (97)l1d cache writeback (a8)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
1004103586186225100010001000169161103510357283868100010001000103541111001100001573141119371000100010361036103610361036
1004103572998622510001000100016916110351035728386810001000100010354111100110000073141119371000100010361036103610361036
1004103571418622510001000100016916110351035728386810001000100010354111100110000073141119371000100010361036103610361036
1004103581188622510001000100016916110351035728386810001000100010354111100110000073141119371000100010361036103610361036
100410358888622510001000100016916110351035728386810001000100010354111100110001073141119371000100010361036103610361036
100410358848622510001000100016916110351035728386810001000100010354111100110000073141119371000100010361036103610361036
1004103571498622510001000100016916110351035728386810001000100010354111100110000073141119371000100010361036103610361036
100410357618622510001000100016916110351035728386810001000100010354111100110000073141119371000100010361036103610361036
100410358618622510001000100016916110351035728386810001000100010354111100110000073141119371000100010361036103610361036
100410358618622510001000100016916110351035728386810001000100010354111100110000073141119371000100010361036103610361036

Test 2: Latency 1->2

Code:

  ubfx x0, x0, #3, #7
  mov x0, 1
  mov x1, 2

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

Result (median cycles for code): 1.0035

retire uop (01)cycle (02)031e3f4d51schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)60696a6d6emap stall dispatch (70)map rewind (75)map stall (76)dispatch uop (78)map int uop (7c)map int uop inputs (7f)8283flush restart other nonspec (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst branch cond (94)inst int alu (97)9fl1d cache writeback (a8)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
10204100357506198772510100101001010088664049695510035100358580387221010010200102001003541111020110099100101001000071013711996210000101001003610036100361003610036
10204100357506198772510100101001010088664149695510035100358580387221010010200102001003541111020110099100101001005071013711994110000101001003610036100361003610036
10204100357506198772510100101001010088664149695510035100358580387221010010200102001003541111020110099100101001000071013711994110000101001003610036100361003610036
10204100357506198772510100101001010088664049695510035100358580387221010010200102001003541111020110099100101001000129071013711994110000101001003610036100361003610036
102041003575456198772510100101001010088664149695510035100358580387221010010200102001003541111020110099100101001005671013711994110000101001003610036100361003610036
10204100357506198772510100101001010088664149695510035100358580387221010010200102001003541111020110099100101001000071013711994110000101001003610036100361003610036
102041003576061987725101001010010100886641496955100351003585803872210100102001020010035411110201100991001010010001271013711994110000101001003610036100361003610036
102041003575061987725101001010010100886641496955100351003585803872210100102001020010035411110201100991001010010001271013711994110000101001003610036100361003610036
102041003575061987725101001010010100886641496955100351003585803872210100102001020010035411110201100991001010010010071013711994110000101001003610036100361003610036
102041003575061987725101001010010100886641496955100351003585803872210100102001020010035411110201100991001010010049371013711994110000101001003610036100361003610036

1000 unrolls and 10 iterations

Result (median cycles for code): 1.0035

retire uop (01)cycle (02)031e3f4d51schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)60696a6d6emap stall dispatch (70)map rewind (75)map stall (76)dispatch uop (78)map int uop (7c)map int uop inputs (7f)8283flush restart other nonspec (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst branch cond (94)inst int alu (97)9faccfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
100241003575961986325100101001010010887841496955100351003586023874010010100201002010035411110021109101001010064024122994010000100101003610036100361003610036
100241003575061986325100101001010010887841496955100351003586023874010010100201002010035411110021109101001010064024122994010000100101003610036100361003610036
100241003575061986325100101001010010887840496955100351003586023874010010100201002010035411110021109101001010064024122994010000100101003610036100361003610036
100241003575061986325100101001010010887840496955100351003586023874010010100201002010035411110021109101001010064024122994010000100101003610036100361003610036
100241003575061986325100101001010010887840496955100351003586023874010010100201002010035411110021109101001010064024122994010000100101003610036100361003610036
100241003575061986325100101001010010887840496955100351003586023874010010100201002010035411110021109101001010064024122994010000100101003610036100361003610036
100241003575061986325100101001010010887840496955100351003586023874010010100201002010035411110021109101001010064024122994010000100101003610036100361003610036
100241003575061986325100101001010010887841496955100351003586023874010010100201002010035411110021109101001010064024122994010000100101003610036100361003610036
100241003575061987525100101001010010887841496955100351003586023874010010100201002010035411110021109101001010064024122994010000100101003610036100361003610036
100241003575061986325100101001010010887840496955100351003586023874010010100201002010035411110021109101001010064024122994010000100101003610036100361003610036

Test 3: throughput

Count: 8

Code:

  ubfx x0, x8, #3, #7
  ubfx x1, x8, #3, #7
  ubfx x2, x8, #3, #7
  ubfx x3, x8, #3, #7
  ubfx x4, x8, #3, #7
  ubfx x5, x8, #3, #7
  ubfx x6, x8, #3, #7
  ubfx x7, x8, #3, #7
  mov x8, 9

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

Result (median cycles for code divided by count): 0.1674

retire uop (01)cycle (02)03191e3f51schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)60696a6d6emap stall dispatch (70)map rewind (75)map stall (76)dispatch uop (78)map int uop (7c)map int uop inputs (7f)8283flush restart other nonspec (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst branch cond (94)inst int alu (97)9fl1d tlb miss (a1)l1d cache writeback (a8)acc2branch cond mispred nonspec (c5)branch mispred nonspec (cb)cdcfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
802041341410000282780136801368014840071014910310133901339033266333680148802648026413390391180201100991008010010000001115120316211338780036801001339113391133911339113391
802041339010002120827801368013680148400710149103101339013390332610333680148802648026413390391180201100991008010010000001115120216211338780036801001339113391133911339113391
8020413390100002827801368013680148400710149103101339013390332663336801488026480264133903911802011009910080100100013301115120216211338780036801001339113391133911339113391
8020413390100002827801368013680148400710149103101339013390332663336801488026480264133903911802011009910080100100007201115120216211338780036801001339113391133911339113391
8020413390100002827801368013680148400710149103101339013390332663336801488026480264133903911802011009910080100100016901115120216221338780036801001339113391133911339113391
802041339010000282780136801368014840071014910310133901339033266333680148802648026413390391180201100991008010010002001115120216221338780036801001339113391133911339113391
802041339010100282780136801368014840071014910310133901339033266333680148802648026413390391180201100991008010010000001115120216221338780036801001339113391133911339113391
802041339010000282780136801368014840071014910310133901339033266333680148802648026413390391180201100991008010010000001115120216211338780036801001339113391133911339113391
802041339010000282780136801368014840071014910310133901339033266333680148802648026413390391180201100991008010010000001115120216231338780036801001339113391133911339113391
802041339010000282780136801368014840071014910310133901339033266335480148802648026413390391180201100991008010010000001115120216221338780036801001339113391133911339113391

1000 unrolls and 10 iterations

Result (median cycles for code divided by count): 0.1671

retire uop (01)cycle (02)03l1i tlb fill (04)l2 tlb miss data (0b)181e3f51schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)60696a6d6emap stall dispatch (70)map rewind (75)map stall (76)dispatch uop (78)map int uop (7c)map int uop inputs (7f)8283flush restart other nonspec (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst branch cond (94)inst int alu (97)9fl1d tlb access (a0)l1d cache writeback (a8)accfd0d2d5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
80024133871000000352580010800108001040005014910291133711337133303334880010800208002013371391180021109108001010000502100719551336880000800101337213372133721337213372
80024133711000000452580010800108001040005014910291133711337133303334880010800208002013371391180021109108001010000502100419541336880000800101337213372133721337213372
80024133711001000352580010800108001040005014910291133711337133303334880010800208002013371391180021109108001010000505100419761336880126800101337213372133721337213372
80024133711000000352580010800108001040005014910291133711337133303334880010800208002013371391180021109108001010000502100519651336880000800101337213372133721337213372
80024133711000000352580010800108001040005014910291133711337133303334880010800208002013371391180021109108001010000502100719551336880000800101337213372133721337213372
80024133711000000352580010800108001040005014910291133711337133303334880010800208002013371391180021109108001010000502100519651336880000800101337213372133721337213372
800241337110000005102580010800108001040005014910291133711337133303334880010800208002013371391180021109108001010000502100619661336880000800101337213372133721337213372
800241337110000015357280010800108001040005014910291133711337133303334880010800208002013371391180021109108001010000502200519461336880000800101337213372133721337213372
80024133711000000352580010800108001040005014910291133711337133303334880010800208002013371391180021109108001010000502200419651336880000800101337213372133721337213372
800241337110000005102580010800108001040005014910291133711337133303334880010800208002013371391180021109108001010000502130519551336880000800101337213372133721337213372