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

MOVK (32-bit)

Test 1: uops

Code:

  movk w0, #0x1234, lsl 16
  mov x0, 1

(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)03181e1f3f4d51schedule 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 tlb access (a0)l1d tlb miss (a1)ld unit uop (a6)l1d cache writeback (a8)a9acc2cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
10041035800061862251000100010001691601035103572838681000100010001035411110011000000000073141119371000100010361036103610361036
10041035700061862251000100010001691601035103572838681000100010001035411110011000000000073141119371000100010361036103610361036
10041035800061862251000100010001691601035103572838681000100010001035411110011000000000073141119371000100010361036103610361036
10041035800061862251000100010001691601035103572838681000100010001035411110011000000000073141119371000100010361036103610361036
10041035700061862251000100010001691601035103572838681000100010001035411110011000000000073141119371000100010361036103610361036
10041035800061862251000100010001691601035103572838681000100010001035411110011000000000073141119371000100010361036103610361036
10041035800061862251000100010001691601035103572838681000100010001035411110011000000000073141119371000100010361036103610361036
1004103580453082862251000100010001691601035103572838681000100010001035411110011000000000073141119371000100010361036103610361036
10041035800061862251000100010001691601035103572838681000100010001035411110011000000000073141119371000100010361036103610361036
100410358000156862251000100010001691601035103572838681000100010001035411110011000000000073141119371000100010361036103610361036

Test 2: Latency 1->1

Code:

  movk w0, #0x1234, lsl 16
  mov x0, 1

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

Result (median cycles for code): 1.0035

retire uop (01)cycle (02)03l2 tlb miss data (0b)181e1f3f4d51schedule 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)9fld unit uop (a6)l1d cache writeback (a8)acbranch cond mispred nonspec (c5)branch mispred nonspec (cb)cdcfmap dispatch bubble (d6)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
1020410035750012097987725101001010010117876861496955100351003586077873410117102401024010035411110201100991001010010000011172016996510000101001003610036100361003610036
1020410035760012061987725101001010010117876861496955100351003586077873410117102401024010035411110201100991001010010000011172016996510000101001003610036100361003610036
102041003575000061987725101001010010117876861496955100351003586077873410117102401024010035411110201100991001010010000011172016996510000101001003610036100361003610036
1020410035750030061987725101001010010117876861496955100351003586077873410117102401024010035411110201100991001010010000011172016996510000101001003610036100361003610036
102041003575000061987725101001010010117876861496955100351003586077873410117102401024010035411110201100991001010010000011172016996510000101001003610036100361003610036
102041003575003061987725101001010010117876861496955100351003586077873410117104071024010035411110201100991001010010000011172016996510000101001003610036100361003610036
102041003575000061987725101001010010117876861496955100351003586077873410117102401024010035411110201100991001010010000011172016996510000101001003610036100361003610036
102041003575000061987725101001010010117876861496955100351003586077873410117102401024010035411110201100991001010010000011172016996510000101001003610036100361003610036
102041003575000061987725101001010010117876861496955100351003586077873410117102401024010035411110201100991001010010000011172016996510000101001003610036100361003610036
102041003575000061987725101001010010117876861496955100351003586077873410117102401024010035411110201100991001010010000011172016996510000101001003610036100361003610036

1000 unrolls and 10 iterations

Result (median cycles for code): 1.0035

retire uop (01)cycle (02)03l2 tlb miss data (0b)18191e1f3f4d51schedule 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)acc2cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
100241003575000006198632510010100101001088784149695510035100358602387401001010020100201003541111002110910100101000064024122994010000100101003610036100361003610036
100241003575000006198632510010100101001088784149695510035100358602387401001010020100201003541111002110910100101000064024122994010000100101003610036100361003610036
100241003575000006198632510010100101001088784149695510035100358602387401001010020100201003541111002110910100101000064024122994010000100101003610036100361003610036
1002410035750004206198632510010100101001088784149695510035100358602387401001010020100201003541111002110910100101000064024122994010000100101003610036100361003610036
100241003575000006198632510010100101001088784149695510035100358602387401001010020100201003541111002110910100101000064024122994010000100101003610036100361003610036
100241003575000006198632510010100101001088784149695510035100358602387401001010020100201003541111002110910100101000064024122994010000100101003610036100361003610036
1002410035750007206198632510033100101001088784149695510035100358602387401001010020100201003541111002110910100101000064024122994010000100101003610036100361003610036
100241003575000306198632510010100101001088784149695510035100358602387401001010020100201003541111002110910100101000064024122994010000100101003610036100361003610036
100241003575000006198632510010100101001088784149695510035100358602387401001010020100201003541111002110910100101000064024122994010000100101003610036100361003610036
100241003575000006198632510010100101001088784149695510035100358602387401001010020100201003541111002110910100101000064024122994010000100101003610036100361003610036

Test 3: throughput

Count: 8

Code:

  movk w0, #0x1234, lsl 16
  movk w1, #0x1234, lsl 16
  movk w2, #0x1234, lsl 16
  movk w3, #0x1234, lsl 16
  movk w4, #0x1234, lsl 16
  movk w5, #0x1234, lsl 16
  movk w6, #0x1234, lsl 16
  movk w7, #0x1234, lsl 16

(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)0318191e1f3f51schedule 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
80204134251000030362580100801008010054318004910312133921339233283334780100802008020013392391180201100991008010010005112219221338980000801001339313393133931339313393
802041339210100005112580100801008010054318014910312133921339233283334780100802008020013392391180201100991008010010005112219221338980000801001339313393133931339313393
80204133921000000362580100801008010054318004910312133921339233283334780100802008020013392391180201100991008010010005112219221338980000801001339313393133931339313393
80204133921000090362580100801008010054318004910312133921339233283334780100802008020013392391180201100991008010010005112219221338980000801001339313393133931339313393
80204133921000060362580100801008010054318004910312133921339233283334780100802008020013392391180201100991008010010005112219221338980000801001339313393133931339313393
80204133921000000362580100801008010054318004910312133921339233283334780100802008020013392391180201100991008010010005112219221338980000801001339313393133931339313393
80204133921010000362580100801008010054318004910312133921339233283334780100802008020013392391180201100991008010010005112219221338980000801001339313393133931339313393
80204133921000000362580100801008010054318004910312133921339233283334780100802008020013392391180201100991008010010005112219221338980000801001339313393133931339313393
80204133921000000362580100801008010054318004910312133921339233283334780100802008020013392391180201100991008010010005112219221338980000801001339313393133931339313393
80204133921000000362580100801008010054318004910312133921339233283334780100802008020013392391180201100991008010010005112219221338980000801001339313393133931339313393

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)03191e1f3f51schedule 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)9fld unit uop (a6)cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
800241339010009036258001080010800104920521491029213372133723330333498001080020800201337239118002110910800101005020319221336980000800101337313373133731337313373
800241337210000036258001080010800104920520491029213372133723330333498001080020800201337239118002110910800101005020219221336980000800101337313373133731337313373
800241337210000036258001080010800104920520491029213372133723330333498001080020800201337239118002110910800101005020219221336980000800101337313373133731337313373
800241337210000036258001080010800104920520491029213372133723330333498001080020800201337239118002110910800101005020219221336980000800101337313373133781337313373
8002413372100012036258001080010800104920520491029213372133723330333498001080020800201337239118002110910800101005020219221336980000800101337313373133731337313373
800241337210000036258001080010800104920520491029213372133723330333498001080020800201337239118002110910800101005020319221336980000800101337313373133731337313373
800241337210000036258001080010800104920520491029213372133723330333498001080020800201337239118002110910800101005020219221336980000800101337313373133731337313373
800241337210000036258001080010800104920520491029213372133723330333498001080020800201337239118002110910800101005020219221336980000800101337313373133731337313373
800241337210000036258001080010800104920520491029213372133723330333498001080020800201337239118002110910800101005020219221336980000800101337313373133731337313373
8002413372100015036258001080010800104920520491029213372133723330333498001080020800201337239118002110910800101005020219221336980000800101337313373133731337313373