Skip to content

Instantly share code, notes, and snippets.

@EgorBo
Created July 20, 2021 21:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save EgorBo/6b380e47a3be83720921ea6bb2c76678 to your computer and use it in GitHub Desktop.
Save EgorBo/6b380e47a3be83720921ea6bb2c76678 to your computer and use it in GitHub Desktop.
new.asm
; Assembly listing for method Tests:Test(ClassAFactoryFactory):long
; Emitting BLENDED_CODE for X64 CPU with SSE2 - Windows
; ReadyToRun compilation
; optimized code
; optimized using profile data
; rsp based frame
; partially interruptible
; with PGO: edge weights are valid, and fgCalledCount is 2e+08
; 0 inlinees with PGO data; 3 single block inlinees; 0 inlinees without PGO data
; Final local variable assignments
;
; V00 arg0 [V00,T00] ( 5, 4 ) ref -> rcx class-hnd single-def
; V01 loc0 [V01,T02] ( 4, 3 ) ref -> rcx class-hnd single-def
; V02 loc1 [V02,T01] ( 6, 5 ) ref -> rcx class-hnd single-def
; V03 OutArgs [V03 ] ( 1, 1 ) lclBlk (32) [rsp+00H] "OutgoingArgSpace"
; V04 tmp1 [V04,T03] ( 3, 2 ) ref -> rcx "guarded devirt return temp"
;* V05 tmp2 [V05 ] ( 0, 0 ) ref -> zero-ref class-hnd exact single-def "guarded devirt this exact temp"
; V06 tmp3 [V06,T04] ( 3, 2 ) ref -> rcx "guarded devirt return temp"
;* V07 tmp4 [V07 ] ( 0, 0 ) ref -> zero-ref class-hnd exact single-def "guarded devirt this exact temp"
; V08 tmp5 [V08,T05] ( 3, 2 ) long -> rax "guarded devirt return temp"
;* V09 tmp6 [V09 ] ( 0, 0 ) ref -> zero-ref class-hnd exact single-def "guarded devirt this exact temp"
;
; Lcl frame size = 40
G_M26221_IG01: ;; offset=0000H
4883EC28 sub rsp, 40
;; bbWeight=1 PerfScore 0.25
G_M26221_IG02: ;; offset=0004H
4885C9 test rcx, rcx
7450 je SHORT G_M26221_IG06
488B0500000000 mov rax, qword ptr [(reloc 0x400000000042ef60)]
483B01 cmp rax, qword ptr [rcx]
754B jne SHORT G_M26221_IG08
FF1500000000 call [CORINFO_HELP_READYTORUN_STATIC_BASE]
488B4808 mov rcx, gword ptr [rax+8]
;; bbWeight=1 PerfScore 11.25
G_M26221_IG03: ;; offset=001FH
4885C9 test rcx, rcx
7435 je SHORT G_M26221_IG06
488B0500000000 mov rax, qword ptr [(reloc 0x400000000042ef70)]
483B01 cmp rax, qword ptr [rcx]
7542 jne SHORT G_M26221_IG09
FF1500000000 call [CORINFO_HELP_READYTORUN_STATIC_BASE]
488B08 mov rcx, gword ptr [rax]
;; bbWeight=1 PerfScore 11.25
G_M26221_IG04: ;; offset=0039H
4885C9 test rcx, rcx
741B je SHORT G_M26221_IG06
488B0500000000 mov rax, qword ptr [(reloc 0x400000000042ef80)]
483B01 cmp rax, qword ptr [rcx]
753A jne SHORT G_M26221_IG10
488B4108 mov rax, qword ptr [rcx+8]
4899 cdq
48F77910 idiv rdx:rax, qword ptr [rcx+16]
;; bbWeight=1 PerfScore 77.25
G_M26221_IG05: ;; offset=0054H
4883C428 add rsp, 40
C3 ret
;; bbWeight=1 PerfScore 1.25
G_M26221_IG06: ;; offset=0059H
33C0 xor eax, eax
;; bbWeight=0 PerfScore 0.00
G_M26221_IG07: ;; offset=005BH
4883C428 add rsp, 40
C3 ret
;; bbWeight=0 PerfScore 0.00
G_M26221_IG08: ;; offset=0060H
4C8D1D00000000 lea r11, [(reloc 0x400000000042ef10)]
FF1500000000 call [ClassAFactoryFactory:GetClassAFactory():ClassAFactory:this]
488BC8 mov rcx, rax
EBAD jmp SHORT G_M26221_IG03
;; bbWeight=0 PerfScore 0.00
G_M26221_IG09: ;; offset=0072H
4C8D1D00000000 lea r11, [(reloc 0x400000000042ef30)]
FF1500000000 call [ClassAFactory:GetA():ClassA:this]
488BC8 mov rcx, rax
EBB5 jmp SHORT G_M26221_IG04
;; bbWeight=0 PerfScore 0.00
G_M26221_IG10: ;; offset=0084H
4C8D1D00000000 lea r11, [(reloc 0x400000000042ef48)]
FF1500000000 call [ClassA:GetValue():long:this]
EBC1 jmp SHORT G_M26221_IG05
;; bbWeight=0 PerfScore 0.00
; Total bytes of code 147, prolog size 4, PerfScore 115.95, instruction count 39, allocated bytes for code 147 (MethodHash=03949992) for method Tests:Test(ClassAFactoryFactory):long
; ============================================================
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment