Skip to content
This repository was archived by the owner on Dec 18, 2018. It is now read-only.

Use Ben's Magic Number for FindFirstEqualByte#1136

Closed
benaadams wants to merge 2 commits into
aspnet:devfrom
benaadams:De-Bruijn
Closed

Use Ben's Magic Number for FindFirstEqualByte#1136
benaadams wants to merge 2 commits into
aspnet:devfrom
benaadams:De-Bruijn

Conversation

@benaadams
Copy link
Copy Markdown
Contributor

@benaadams benaadams commented Oct 1, 2016

De Bruijn sequence as suggested by @mburbea in #1129

Also inlines due to issue https://github.com/dotnet/coreclr/issues/7386

Added the JitReadonlyConsts() function as it was non-deterministic on when the readonly statics where evaluated.

If it was first evaluated in the same function that used it then it wouldn't do branch elimination.

Added comments also...

Need to use most recent coreclr for items such as dotnet/coreclr#7367 and dotnet/coreclr#7407

@benaadams
Copy link
Copy Markdown
Contributor Author

benaadams commented Oct 1, 2016

Generates the following 98 bytes of asm (without the final inline)

Details
Successfully inlined Vector:AsVectorUInt64(struct):struct (7 IL bytes) (depth 1) [below ALWAYS_INLINE size]
Successfully inlined MemoryPoolIterator:BensMagicNumberFindByte(long):int (23 IL bytes) (depth 1) [aggressive inline attribute]
**************** Inline Tree
Inlines into 06000167 MemoryPoolIterator:FindFirstEqualByte(byref):int
  [1 IL=0013 TR=000007 0600009C] [below ALWAYS_INLINE size] Vector:AsVectorUInt64(struct):struct
  [2 IL=0056 TR=000061 06000168] [aggressive inline attribute] MemoryPoolIterator:BensMagicNumberFindByte(long):int
Budget: initialTime=270, finalTime=302, initialBudget=2700, currentBudget=2732
Budget: increased by 32 because of force inlines
Budget: initialSize=1727, finalSize=1727
; Assembly listing for method MemoryPoolIterator:FindFirstEqualByte(byref):int
; Emitting BLENDED_CODE for X64 CPU with SSE2
; optimized code
; rsp based frame
; fully interruptible
; Final local variable assignments
;
;  V00 arg0         [V00,T02] (  3,   3  )   byref  ->  rcx        
;  V01 loc0         [V01,T03] (  2,   5  )  simd16  ->  mm0         ld-addr-op
;  V02 loc1         [V02,T01] (  4,  10  )    long  ->  rdx        
;  V03 loc2         [V03,T00] (  7,  22  )     int  ->  rax        
;  V04 tmp0         [V04,T04] (  2,   4  )  simd16  ->  mm0        
;  V05 OutArgs      [V05    ] (  1,   1  )  lclBlk (32) [rsp+0x00]  
;  V06 rat0         [V06    ] (  1,   1  )  simd16  ->  [rsp+0x28]   do-not-enreg[XS] must-init addr-exposed
;
; Lcl frame size = 56

G_M48473_IG01:
       4883EC38             sub      rsp, 56
       33C0                 xor      rax, rax
       4889442428           mov      qword ptr [rsp+28H], rax
       4889442430           mov      qword ptr [rsp+30H], rax

G_M48473_IG02:
       0F1001               movups   xmm0, xmmword ptr [rcx]
       33C0                 xor      eax, eax

G_M48473_IG03:
       83F802               cmp      eax, 2
       7342                 jae      SHORT G_M48473_IG06
       0F11442428           movups   xmmword ptr [rsp+28H], xmm0
       488B54C428           mov      rdx, qword ptr [rsp+8*rax+28H]
       4885D2               test     rdx, rdx
       7507                 jne      SHORT G_M48473_IG04
       FFC0                 inc      eax
       83F803               cmp      eax, 3
       7CE5                 jl       SHORT G_M48473_IG03

G_M48473_IG04:
       488BCA               mov      rcx, rdx
       48F7D9               neg      rcx
       4823CA               and      rcx, rdx
       48C1E908             shr      rcx, 8
       48BA8003830282018100 mov      rdx, 0x81018202830380
       480FAFCA             imul     rcx, rdx
       48C1E937             shr      rcx, 55
       8BD1                 mov      edx, ecx
       83E207               and      edx, 7
       8D04C2               lea      eax, [rdx+8*rax]

G_M48473_IG05:
       4883C438             add      rsp, 56
       C3                   ret      

G_M48473_IG06:
       E81F568D5F           call     CORINFO_HELP_RNGCHKFAIL
       CC                   int3     

; Total bytes of code 98, prolog size 16 for method MemoryPoolIterator:FindFirstEqualByte(byref):int
Previously generated the following 318 bytes of asm
Details
Successfully inlined Vector:AsVectorInt64(struct):struct (7 IL bytes) (depth 1) [below ALWAYS_INLINE size]
**************** Inline Tree
Inlines into 06000166 MemoryPoolIterator:FindFirstEqualByte(byref):int
  [0 IL=0008 TR=000271 06000167] [FAILED: too many il bytes] MemoryPoolIterator:FindFirstEqualByteSlow(byref):int
  [1 IL=0020 TR=000016 0600009D] [below ALWAYS_INLINE size] Vector:AsVectorInt64(struct):struct
  [0 IL=0176 TR=000263 06002C13] [FAILED: unprofitable inline] InvalidOperationException:.ctor():this
Budget: initialTime=606, finalTime=606, initialBudget=6060, currentBudget=6060
Budget: initialSize=4280, finalSize=4280
; Assembly listing for method MemoryPoolIterator:FindFirstEqualByte(byref):int
; Emitting BLENDED_CODE for X64 CPU with SSE2
; optimized code
; rsp based frame
; fully interruptible
; Final local variable assignments
;
;  V00 arg0         [V00,T02] (  4,   3  )   byref  ->  rsi        
;  V01 loc0         [V01,T05] (  2,   4.5)  simd16  ->  mm0         ld-addr-op
;  V02 loc1         [V02,T00] (  7,  21  )     int  ->  rcx        
;  V03 loc2         [V03,T01] (  9,  11.5)    long  ->  rax        
;  V04 tmp0         [V04,T07] (  3,   1.5)     int  ->  rcx        
;  V05 tmp1         [V05,T08] (  3,   1.5)     int  ->  rcx        
;  V06 tmp2         [V06,T09] (  3,   1.5)     int  ->  rcx        
;  V07 tmp3         [V07,T03] (  9,   4.5)     int  ->  rcx        
;  V08 tmp4         [V08,T04] (  9,   4.5)     int  ->  rdx        
;  V09 tmp5         [V09,T10] (  3,   1.5)     int  ->  rcx        
;  V10 tmp6         [V10,T11] (  3,   1.5)     int  ->  rcx        
;  V11 tmp7         [V11,T12] (  3,   1.5)     int  ->  rcx        
;  V12 tmp8         [V12,T13] (  3,   1.5)     int  ->  rcx        
;  V13 tmp9         [V13,T14] (  3,   0  )     ref  ->  rsi        
;  V14 tmp10        [V14,T06] (  2,   2  )  simd16  ->  mm0        
;  V15 OutArgs      [V15    ] (  1,   1  )  lclBlk (32) [rsp+0x00]  
;  V16 rat0         [V16    ] (  1,   1  )  simd16  ->  [rsp+0x20]   do-not-enreg[XS] must-init addr-exposed
;
; Lcl frame size = 48

G_M48472_IG01:
       push     rsi
       sub      rsp, 48
       xor      rax, rax
       mov      qword ptr [rsp+20H], rax
       mov      qword ptr [rsp+28H], rax
       mov      rsi, rcx

G_M48472_IG02:
       mov      rcx, 0xD1FFAB1E
       mov      edx, 3
       call     CORINFO_HELP_GETSHARED_NONGCSTATIC_BASE
       movzx    rcx, byte  ptr [reloc classVar[0xd1ffab1e]]
       test     ecx, ecx
       jne      SHORT G_M48472_IG04
       mov      rcx, rsi
       call     MemoryPoolIterator:FindFirstEqualByteSlow(byref):int
       nop      

G_M48472_IG03:
       add      rsp, 48
       pop      rsi
       ret      

G_M48472_IG04:
       movups   xmm0, xmmword ptr [rsi]
       xor      ecx, ecx

G_M48472_IG05:
       cmp      ecx, 2
       jae      G_M48472_IG17
       movups   xmmword ptr [rsp+20H], xmm0
       mov      rax, qword ptr [rsp+8*rcx+20H]
       test     rax, rax
       je       G_M48472_IG15
       shl      ecx, 3
       mov      edx, 0xD1FFAB1E
       and      rdx, rax
       test     rdx, rdx
       jg       SHORT G_M48472_IG09
       mov      rdx, 0xD1FFAB1E
       and      rdx, rax
       test     rdx, rdx
       jg       SHORT G_M48472_IG07
       mov      rdx, 0xD1FFAB1E
       and      rax, rdx
       test     rax, rax
       jg       SHORT G_M48472_IG06
       mov      edx, 7
       jmp      SHORT G_M48472_IG13

G_M48472_IG06:
       mov      edx, 6
       jmp      SHORT G_M48472_IG13

G_M48472_IG07:
       mov      rdx, 0xD1FFAB1E
       and      rax, rdx
       test     rax, rax
       jg       SHORT G_M48472_IG08
       mov      edx, 5
       jmp      SHORT G_M48472_IG13

G_M48472_IG08:
       mov      edx, 4
       jmp      SHORT G_M48472_IG13

G_M48472_IG09:
       mov      rdx, rax
       and      rdx, 0xFFFF
       test     rdx, rdx
       jg       SHORT G_M48472_IG11
       and      rax, 0xD1FFAB1E
       test     rax, rax
       jg       SHORT G_M48472_IG10
       mov      edx, 3
       jmp      SHORT G_M48472_IG13

G_M48472_IG10:
       mov      edx, 2
       jmp      SHORT G_M48472_IG13

G_M48472_IG11:
       and      rax, 255
       test     rax, rax
       jg       SHORT G_M48472_IG12
       mov      edx, 1
       jmp      SHORT G_M48472_IG13

G_M48472_IG12:
       xor      edx, edx

G_M48472_IG13:
       lea      eax, [rcx+rdx]

G_M48472_IG14:
       add      rsp, 48
       pop      rsi
       ret      

G_M48472_IG15:
       inc      ecx
       cmp      ecx, 2
       jl       G_M48472_IG05

G_M48472_IG16:
       mov      rcx, 0xD1FFAB1E
       call     CORINFO_HELP_NEWSFAST
       mov      rsi, rax
       mov      rcx, rsi
       call     InvalidOperationException:.ctor():this
       mov      rcx, rsi
       call     CORINFO_HELP_THROW
       int3     

G_M48472_IG17:
       call     CORINFO_HELP_RNGCHKFAIL
       int3     

; Total bytes of code 318, prolog size 20 for method MemoryPoolIterator:FindFirstEqualByte(byref):int

@benaadams
Copy link
Copy Markdown
Contributor Author

JitReadonlyConsts() moves all this to start up rather than to random places

Details
Successfully inlined KestrelEngine:JitReadonlyConsts() (13 IL bytes) (depth 1) [below ALWAYS_INLINE size]
Successfully inlined KestrelEngine:get_Threads():ref:this (7 IL bytes) (depth 1) [below ALWAYS_INLINE size]
Successfully inlined KestrelEngine:get_Threads():ref:this (7 IL bytes) (depth 1) [below ALWAYS_INLINE size]
Successfully inlined List`1:GetEnumerator():struct:this (7 IL bytes) (depth 1) [below ALWAYS_INLINE size]
Successfully inlined Enumerator:.ctor(ref):this (39 IL bytes) (depth 2) [profitable inline]
Successfully inlined Enumerator:get_Current():ref:this (7 IL bytes) (depth 1) [below ALWAYS_INLINE size]
Successfully inlined Task:Wait():this (18 IL bytes) (depth 1) [profitable inline]
Successfully inlined Enumerator:Dispose():this (1 IL bytes) (depth 1) [below ALWAYS_INLINE size]
**************** Inline Tree
Inlines into 0600004B KestrelEngine:Start(int):this
  [1 IL=0000 TR=000001 0600004C] [below ALWAYS_INLINE size] KestrelEngine:JitReadonlyConsts()
  [2 IL=0010 TR=000015 06000045] [below ALWAYS_INLINE size] KestrelEngine:get_Threads():ref:this
  [0 IL=0016 TR=000025 06000062] [FAILED: too many il bytes] KestrelThread:.ctor(ref):this
  [0 IL=0021 TR=000033 06003BF1] [FAILED: noinline per IL/cached result] List`1:Add(ref):this
  [3 IL=0035 TR=000044 06000045] [below ALWAYS_INLINE size] KestrelEngine:get_Threads():ref:this
  [4 IL=0040 TR=000047 06003C0C] [below ALWAYS_INLINE size] List`1:GetEnumerator():struct:this
    [5 IL=0001 TR=000129 06003C29] [profitable inline] Enumerator:.ctor(ref):this
  [6 IL=0050 TR=000068 06003C2D] [below ALWAYS_INLINE size] Enumerator:get_Current():ref:this
  [0 IL=0055 TR=000073 0600006B] [FAILED: unprofitable inline] KestrelThread:StartAsync():ref:this
  [7 IL=0060 TR=000076 0600226A] [profitable inline] Task:Wait():this
    [0 IL=0011 TR=000192 0600226E] [FAILED: noinline per IL/cached result] Task:Wait(int,struct):bool:this
  [0 IL=0067 TR=000058 06003C2B] [FAILED: noinline per IL/cached result] Enumerator:MoveNext():bool:this
  [8 IL=0085 TR=000085 06003C2A] [below ALWAYS_INLINE size] Enumerator:Dispose():this
Budget: initialTime=333, finalTime=419, initialBudget=3330, currentBudget=3330
Budget: initialSize=2206, finalSize=2506
; Assembly listing for method KestrelEngine:Start(int):this
; Emitting BLENDED_CODE for X64 CPU with SSE2
; optimized code
; rbp based frame
; fully interruptible
; Final local variable assignments
;
;  V00 this         [V00,T04] (  5,  19  )     ref  ->  rsi         this
;  V01 arg1         [V01,T05] (  4,  11  )     int  ->  rdi        
;  V02 loc0         [V02,T03] (  4,  25  )     int  ->  rbx        
;  V03 loc1         [V03    ] (  7,  21  )  struct (24) [rbp-0x40]   do-not-enreg[XS] must-init addr-exposed ld-addr-op
;  V04 tmp0         [V04,T00] (  3,  48  )     ref  ->  r14        
;  V05 tmp1         [V05,T02] (  2,  32  )     ref  ->  r15        
;  V06 tmp2         [V06,T07] (  3,   6  )     ref  ->  rcx        
;* V07 tmp3         [V07    ] (  0,   0  )  struct (24) zero-ref   
;  V08 tmp4         [V08,T01] (  3,  48  )     ref  ->  rcx        
;* V09 tmp5         [V09    ] (  0,   0  )  struct ( 8) zero-ref    ld-addr-op
;  V10 tmp6         [V10    ] (  3,  10  )     ref  ->  [rbp-0x40]   do-not-enreg[X] addr-exposed V03.list(offs=0x00) P-DEP
;  V11 tmp7         [V11    ] (  4,  18  )     ref  ->  [rbp-0x38]   do-not-enreg[X] addr-exposed V03.current(offs=0x08) P-DEP
;  V12 tmp8         [V12    ] (  3,  10  )     int  ->  [rbp-0x30]   do-not-enreg[X] addr-exposed V03.index(offs=0x10) P-DEP
;  V13 tmp9         [V13    ] (  3,  10  )     int  ->  [rbp-0x2C]   do-not-enreg[X] addr-exposed V03.version(offs=0x14) P-DEP
;  V14 tmp10        [V14,T08] (  3,   3  )     ref  ->  rcx         V07.list(offs=0x00) P-INDEP
;  V15 tmp11        [V15,T09] (  2,   2  )     ref  ->   r8         V07.current(offs=0x08) P-INDEP
;  V16 tmp12        [V16,T10] (  2,   2  )     int  ->  rdx         V07.index(offs=0x10) P-INDEP
;  V17 tmp13        [V17,T11] (  2,   2  )     int  ->  rax         V07.version(offs=0x14) P-INDEP
;* V18 tmp14        [V18,T06] (  0,   0  )     ref  ->  zero-ref    V09.m_source(offs=0x00) P-INDEP
;  V19 OutArgs      [V19    ] (  1,   1  )  lclBlk (32) [rsp+0x00]  
;  V20 PSPSym       [V20    ] (  1,   1  )    long  ->  [rbp-0x50]   do-not-enreg[X] addr-exposed
;
; Lcl frame size = 72

G_M10005_IG01:
       push     rbp
       push     r15
       push     r14
       push     rdi
       push     rsi
       push     rbx
       sub      rsp, 72
       lea      rbp, [rsp+70H]
       mov      rsi, rcx
       lea      rdi, [rbp-40H]
       mov      ecx, 6
       xor      rax, rax
       rep stosd 
       mov      rcx, rsi
       mov      qword ptr [rbp-50H], rsp
       mov      rsi, rcx
       mov      edi, edx

G_M10005_IG02:
       mov      rcx, 0xD1FFAB1E
       mov      edx, 38
       call     CORINFO_HELP_GETSHARED_NONGCSTATIC_BASE
       mov      byte  ptr [reloc classVar[0xd1ffab1e]], 1
       mov      rcx, 0xD1FFAB1E
       mov      edx, 39
       call     CORINFO_HELP_GETSHARED_NONGCSTATIC_BASE
       mov      byte  ptr [reloc classVar[0xd1ffab1e]], 1
       xor      ebx, ebx
       test     edi, edi
       jle      SHORT G_M10005_IG04

G_M10005_IG03:
       mov      rcx, 0xD1FFAB1E
       call     CORINFO_HELP_NEWSFAST
       mov      r14, rax
       mov      r15, gword ptr [rsi+24]
       mov      rcx, r14
       mov      rdx, rsi
       call     KestrelThread:.ctor(ref):this
       mov      rcx, r15
       mov      rdx, r14
       cmp      dword ptr [rcx], ecx
       call     List`1:Add(ref):this
       inc      ebx
       cmp      ebx, edi
       jl       SHORT G_M10005_IG03

G_M10005_IG04:
       mov      rcx, gword ptr [rsi+24]
       mov      edx, dword ptr [rcx]
       xor      edx, edx
       mov      eax, dword ptr [rcx+28]
       xor      r8, r8
       mov      gword ptr [rbp-40H], rcx
       mov      gword ptr [rbp-38H], r8
       mov      dword ptr [rbp-30H], edx
       mov      dword ptr [rbp-2CH], eax

G_M10005_IG05:
       lea      rcx, bword ptr [rbp-40H]
       mov      rdx, 0xD1FFAB1E
       call     Enumerator:MoveNext():bool:this
       test     eax, eax
       je       SHORT G_M10005_IG07

G_M10005_IG06:
       mov      rcx, gword ptr [rbp-38H]
       cmp      dword ptr [rcx], ecx
       call     KestrelThread:StartAsync():ref:this
       mov      rcx, rax
       mov      r8d, dword ptr [rcx]
       xor      r8, r8
       mov      edx, -1
       call     Task:Wait(int,struct):bool:this
       lea      rcx, bword ptr [rbp-40H]
       mov      rdx, 0xD1FFAB1E
       call     Enumerator:MoveNext():bool:this
       test     eax, eax
       jne      SHORT G_M10005_IG06

G_M10005_IG07:
       mov      rcx, rsp
       call     G_M10005_IG10

G_M10005_IG08:
       nop      

G_M10005_IG09:
       lea      rsp, [rbp-28H]
       pop      rbx
       pop      rsi
       pop      rdi
       pop      r14
       pop      r15
       pop      rbp
       ret      

G_M10005_IG10:
       push     rbp
       push     r15
       push     r14
       push     rdi
       push     rsi
       push     rbx
       sub      rsp, 40
       mov      rbp, qword ptr [rcx+32]
       mov      qword ptr [rsp+20H], rbp
       lea      rbp, [rbp+70H]

G_M10005_IG11:
       add      rsp, 40
       pop      rbx
       pop      rsi
       pop      rdi
       pop      r14
       pop      r15
       pop      rbp
       ret      

; Total bytes of code 321, prolog size 45 for method KestrelEngine:Start(int):this
; ============================================================
; Assembly listing for method MemoryPoolIterator:.cctor()
; Emitting BLENDED_CODE for X64 CPU with SSE2
; compiler->opts.MinOpts() is true
; rbp based frame
; partially interruptible
; Final local variable assignments
;
;  V00 tmp0         [V00,T00] (  3,   6  )     ref  ->  [rbp-0x18]   must-init
;  V01 tmp1         [V01,T01] (  2,   4  )  struct ( 8) [rbp-0x10]   do-not-enreg[S] must-init
;  V02 OutArgs      [V02    ] (  1,   1  )  lclBlk (32) [rsp+0x00]  
;
; Lcl frame size = 56

G_M32137_IG01:
       push     rbp
       push     rdi
       sub      rsp, 56
       lea      rbp, [rsp+40H]
       lea      rdi, [rbp-18H]
       mov      ecx, 4
       xor      rax, rax
       rep stosd 

G_M32137_IG02:
       mov      rcx, 0xD1FFAB1E
       mov      edx, 64
       call     CORINFO_HELP_NEWARR_1_VC
       mov      gword ptr [rbp-18H], rax
       mov      rcx, 0xD1FFAB1E
       call     CORINFO_HELP_FIELDDESC_TO_STUBRUNTIMEFIELD
       mov      gword ptr [rbp-10H], rax
       mov      rcx, gword ptr [rbp-18H]
       mov      rdx, gword ptr [rbp-10H]
       call     RuntimeHelpers:InitializeArray(ref,struct)
       mov      rcx, 0xD1FFAB1E
       mov      rdx, gword ptr [rbp-18H]
       call     CORINFO_HELP_CHECKED_ASSIGN_REF
       mov      byte  ptr [reloc classVar[0xd1ffab1e]], 1
       mov      rcx, 0xD1FFAB1E
       mov      edx, 3
       call     CORINFO_HELP_GETSHARED_NONGCSTATIC_BASE
       movzx    rax, byte  ptr [reloc classVar[0xd1ffab1e]]
       mov      byte  ptr [reloc classVar[0xd1ffab1e]], al
       mov      dword ptr [reloc classVar[0xd1ffab1e]], 16
       mov      dword ptr [reloc classVar[0xd1ffab1e]], 2
       mov      eax, dword ptr [reloc classVar[0xd1ffab1e]]
       cdq      
       idiv     edx:eax, dword ptr [reloc classVar[0xd1ffab1e]]
       mov      dword ptr [reloc classVar[0xd1ffab1e]], eax

G_M32137_IG03:
       lea      rsp, [rbp-08H]
       pop      rdi
       pop      rbp
       ret      

; Total bytes of code 185, prolog size 24 for method MemoryPoolIterator:.cctor()
; ============================================================
; Assembly listing for method BitConverter:.cctor()
; Emitting BLENDED_CODE for X64 CPU with SSE2
; compiler->opts.MinOpts() is true
; rbp based frame
; partially interruptible
; Final local variable assignments
;
;  V00 OutArgs      [V00    ] (  1,   1  )  lclBlk (32) [rsp+0x00]  
;
; Lcl frame size = 32

G_M43153_IG01:
       push     rbp
       sub      rsp, 32
       lea      rbp, [rsp+20H]

G_M43153_IG02:
       call     BitConverter:GetIsLittleEndian():bool
       mov      byte  ptr [reloc classVar[0xd1ffab1e]], al

G_M43153_IG03:
       lea      rsp, [rbp]
       pop      rbp
       ret      

; Total bytes of code 27, prolog size 10 for method BitConverter:.cctor()
; ============================================================
**************** Inline Tree
Inlines into 06000001 BitConverter:GetIsLittleEndian():bool
Budget: initialTime=90, finalTime=90, initialBudget=900, currentBudget=900
Budget: initialSize=359, finalSize=359
; Assembly listing for method BitConverter:GetIsLittleEndian():bool
; Emitting BLENDED_CODE for X64 CPU with SSE2
; optimized code
; rsp based frame
; partially interruptible
; Final local variable assignments
;
;  V00 loc0         [V00    ] (  2,   2  )     int  ->  [rsp+0x04]   do-not-enreg[XF] must-init addr-exposed ld-addr-op
;# V01 OutArgs      [V01    ] (  1,   1  )  lclBlk ( 0) [rsp+0x00]  
;
; Lcl frame size = 8

G_M40607_IG01:
       push     rax
       xor      rax, rax
       mov      dword ptr [rsp+04H], eax

G_M40607_IG02:
       mov      dword ptr [rsp+04H], 1
       cmp      byte  ptr [rsp+04H], 1
       sete     al
       movzx    rax, al

G_M40607_IG03:
       add      rsp, 8
       ret      

; Total bytes of code 31, prolog size 7 for method BitConverter:GetIsLittleEndian():bool
; ============================================================
; Assembly listing for method MemoryPoolIteratorExtensions:.cctor()
; Emitting BLENDED_CODE for X64 CPU with SSE2
; compiler->opts.MinOpts() is true
; rbp based frame
; partially interruptible
; Final local variable assignments
;
;  V00 tmp0         [V00,T01] (  3,   6  )     ref  ->  [rbp-0xB8]   must-init
;  V01 tmp1         [V01,T22] (  2,   4  )  struct ( 8) [rbp-0x10]   do-not-enreg[S] must-init
;  V02 tmp2         [V02,T02] (  3,   6  )     ref  ->  [rbp-0xC0]   must-init
;  V03 tmp3         [V03,T23] (  2,   4  )  struct ( 8) [rbp-0x18]   do-not-enreg[S] must-init
;  V04 tmp4         [V04,T03] (  3,   6  )     ref  ->  [rbp-0xC8]   must-init
;  V05 tmp5         [V05,T24] (  2,   4  )  struct ( 8) [rbp-0x20]   do-not-enreg[S] must-init
;  V06 tmp6         [V06,T04] (  3,   6  )     ref  ->  [rbp-0xD0]   must-init
;  V07 tmp7         [V07,T25] (  2,   4  )  struct ( 8) [rbp-0x28]   do-not-enreg[S] must-init
;  V08 tmp8         [V08,T05] (  3,   6  )     ref  ->  [rbp-0xD8]   must-init
;  V09 tmp9         [V09,T26] (  2,   4  )  struct ( 8) [rbp-0x30]   do-not-enreg[S] must-init
;  V10 tmp10        [V10,T00] ( 10,  20  )     ref  ->  [rbp-0xE0]   must-init
;  V11 tmp11        [V11,T06] (  2,   4  )     ref  ->  [rbp-0xE8]   must-init
;  V12 tmp12        [V12,T27] (  2,   4  )    long  ->  [rbp-0x38]   must-init
;  V13 tmp13        [V13,T28] (  2,   4  )    long  ->  [rbp-0x40]   must-init
;  V14 tmp14        [V14,T07] (  2,   4  )     ref  ->  [rbp-0xF0]   must-init
;  V15 tmp15        [V15,T08] (  2,   4  )     ref  ->  [rbp-0xF8]   must-init
;  V16 tmp16        [V16,T29] (  2,   4  )    long  ->  [rbp-0x48]   must-init
;  V17 tmp17        [V17,T30] (  2,   4  )    long  ->  [rbp-0x50]   must-init
;  V18 tmp18        [V18,T09] (  2,   4  )     ref  ->  [rbp-0x100]   must-init
;  V19 tmp19        [V19,T10] (  2,   4  )     ref  ->  [rbp-0x108]   must-init
;  V20 tmp20        [V20,T31] (  2,   4  )    long  ->  [rbp-0x58]   must-init
;  V21 tmp21        [V21,T32] (  2,   4  )    long  ->  [rbp-0x60]   must-init
;  V22 tmp22        [V22,T11] (  2,   4  )     ref  ->  [rbp-0x110]   must-init
;  V23 tmp23        [V23,T12] (  2,   4  )     ref  ->  [rbp-0x118]   must-init
;  V24 tmp24        [V24,T33] (  2,   4  )    long  ->  [rbp-0x68]   must-init
;  V25 tmp25        [V25,T34] (  2,   4  )    long  ->  [rbp-0x70]   must-init
;  V26 tmp26        [V26,T13] (  2,   4  )     ref  ->  [rbp-0x120]   must-init
;  V27 tmp27        [V27,T14] (  2,   4  )     ref  ->  [rbp-0x128]   must-init
;  V28 tmp28        [V28,T35] (  2,   4  )    long  ->  [rbp-0x78]   must-init
;  V29 tmp29        [V29,T36] (  2,   4  )    long  ->  [rbp-0x80]   must-init
;  V30 tmp30        [V30,T15] (  2,   4  )     ref  ->  [rbp-0x130]   must-init
;  V31 tmp31        [V31,T16] (  2,   4  )     ref  ->  [rbp-0x138]   must-init
;  V32 tmp32        [V32,T37] (  2,   4  )    long  ->  [rbp-0x88]   must-init
;  V33 tmp33        [V33,T38] (  2,   4  )    long  ->  [rbp-0x90]   must-init
;  V34 tmp34        [V34,T17] (  2,   4  )     ref  ->  [rbp-0x140]   must-init
;  V35 tmp35        [V35,T18] (  2,   4  )     ref  ->  [rbp-0x148]   must-init
;  V36 tmp36        [V36,T39] (  2,   4  )    long  ->  [rbp-0x98]   must-init
;  V37 tmp37        [V37,T40] (  2,   4  )    long  ->  [rbp-0xA0]   must-init
;  V38 tmp38        [V38,T19] (  2,   4  )     ref  ->  [rbp-0x150]   must-init
;  V39 tmp39        [V39,T20] (  2,   4  )     ref  ->  [rbp-0x158]   must-init
;  V40 tmp40        [V40,T41] (  2,   4  )    long  ->  [rbp-0xA8]   must-init
;  V41 tmp41        [V41,T42] (  2,   4  )    long  ->  [rbp-0xB0]   must-init
;  V42 tmp42        [V42,T21] (  2,   4  )     ref  ->  [rbp-0x160]   must-init
;  V43 OutArgs      [V43    ] (  1,   1  )  lclBlk (32) [rsp+0x00]  
;
; Lcl frame size = 376

G_M57955_IG01:
       push     rbp
       push     rdi
       sub      rsp, 376
       lea      rbp, [rsp+180H]
       lea      rdi, [rbp-160H]
       mov      ecx, 86
       xor      rax, rax
       rep stosd 

G_M57955_IG02:
       call     Encoding:get_UTF8():ref
       mov      rcx, 0xD1FFAB1E
       mov      rdx, rax
       call     CORINFO_HELP_CHECKED_ASSIGN_REF
       mov      rcx, 0xD1FFAB1E
       mov      rcx, gword ptr [rcx]
       call     MemoryPoolIteratorExtensions:GetAsciiStringAsLong(ref):long
       mov      qword ptr [reloc classVar[0xd1ffab1e]], rax
       mov      rcx, 0xD1FFAB1E
       mov      rcx, gword ptr [rcx]
       call     MemoryPoolIteratorExtensions:GetAsciiStringAsLong(ref):long
       mov      qword ptr [reloc classVar[0xd1ffab1e]], rax
       mov      rcx, 0xD1FFAB1E
       mov      rcx, gword ptr [rcx]
       call     MemoryPoolIteratorExtensions:GetAsciiStringAsLong(ref):long
       mov      qword ptr [reloc classVar[0xd1ffab1e]], rax
       mov      rcx, 0xD1FFAB1E
       mov      rcx, gword ptr [rcx]
       call     MemoryPoolIteratorExtensions:GetAsciiStringAsLong(ref):long
       mov      qword ptr [reloc classVar[0xd1ffab1e]], rax
       mov      rcx, 0xD1FFAB1E
       mov      rcx, gword ptr [rcx]
       call     MemoryPoolIteratorExtensions:GetAsciiStringAsLong(ref):long
       mov      qword ptr [reloc classVar[0xd1ffab1e]], rax
       mov      rcx, 0xD1FFAB1E
       mov      rcx, gword ptr [rcx]
       call     MemoryPoolIteratorExtensions:GetAsciiStringAsLong(ref):long
       mov      qword ptr [reloc classVar[0xd1ffab1e]], rax
       mov      rcx, 0xD1FFAB1E
       mov      rcx, gword ptr [rcx]
       call     MemoryPoolIteratorExtensions:GetAsciiStringAsLong(ref):long
       mov      qword ptr [reloc classVar[0xd1ffab1e]], rax
       mov      rcx, 0xD1FFAB1E
       mov      rcx, gword ptr [rcx]
       call     MemoryPoolIteratorExtensions:GetAsciiStringAsLong(ref):long
       mov      qword ptr [reloc classVar[0xd1ffab1e]], rax
       mov      rcx, 0xD1FFAB1E
       mov      rcx, gword ptr [rcx]
       call     MemoryPoolIteratorExtensions:GetAsciiStringAsLong(ref):long
       mov      qword ptr [reloc classVar[0xd1ffab1e]], rax
       mov      rcx, 0xD1FFAB1E
       mov      rcx, gword ptr [rcx]
       call     MemoryPoolIteratorExtensions:GetAsciiStringAsLong(ref):long
       mov      qword ptr [reloc classVar[0xd1ffab1e]], rax
       mov      rcx, 0xD1FFAB1E
       mov      rcx, gword ptr [rcx]
       call     MemoryPoolIteratorExtensions:GetAsciiStringAsLong(ref):long
       mov      qword ptr [reloc classVar[0xd1ffab1e]], rax
       mov      rcx, 0xD1FFAB1E
       mov      edx, 8
       call     CORINFO_HELP_NEWARR_1_VC
       mov      gword ptr [rbp-B8H], rax
       mov      rcx, 0xD1FFAB1E

G_M57955_IG03:
       call     CORINFO_HELP_FIELDDESC_TO_STUBRUNTIMEFIELD
       mov      gword ptr [rbp-10H], rax
       mov      rcx, gword ptr [rbp-B8H]
       mov      rdx, gword ptr [rbp-10H]
       call     RuntimeHelpers:InitializeArray(ref,struct)
       mov      rcx, gword ptr [rbp-B8H]
       call     MemoryPoolIteratorExtensions:GetMaskAsLong(ref):long
       mov      qword ptr [reloc classVar[0xd1ffab1e]], rax
       mov      rcx, 0xD1FFAB1E
       mov      edx, 8
       call     CORINFO_HELP_NEWARR_1_VC
       mov      gword ptr [rbp-C0H], rax
       mov      rcx, 0xD1FFAB1E
       call     CORINFO_HELP_FIELDDESC_TO_STUBRUNTIMEFIELD
       mov      gword ptr [rbp-18H], rax
       mov      rcx, gword ptr [rbp-C0H]
       mov      rdx, gword ptr [rbp-18H]
       call     RuntimeHelpers:InitializeArray(ref,struct)
       mov      rcx, gword ptr [rbp-C0H]
       call     MemoryPoolIteratorExtensions:GetMaskAsLong(ref):long
       mov      qword ptr [reloc classVar[0xd1ffab1e]], rax
       mov      rcx, 0xD1FFAB1E
       mov      edx, 8
       call     CORINFO_HELP_NEWARR_1_VC
       mov      gword ptr [rbp-C8H], rax
       mov      rcx, 0xD1FFAB1E
       call     CORINFO_HELP_FIELDDESC_TO_STUBRUNTIMEFIELD
       mov      gword ptr [rbp-20H], rax
       mov      rcx, gword ptr [rbp-C8H]
       mov      rdx, gword ptr [rbp-20H]
       call     RuntimeHelpers:InitializeArray(ref,struct)
       mov      rcx, gword ptr [rbp-C8H]
       call     MemoryPoolIteratorExtensions:GetMaskAsLong(ref):long
       mov      qword ptr [reloc classVar[0xd1ffab1e]], rax
       mov      rcx, 0xD1FFAB1E
       mov      edx, 8
       call     CORINFO_HELP_NEWARR_1_VC
       mov      gword ptr [rbp-D0H], rax
       mov      rcx, 0xD1FFAB1E
       call     CORINFO_HELP_FIELDDESC_TO_STUBRUNTIMEFIELD
       mov      gword ptr [rbp-28H], rax
       mov      rcx, gword ptr [rbp-D0H]
       mov      rdx, gword ptr [rbp-28H]
       call     RuntimeHelpers:InitializeArray(ref,struct)
       mov      rcx, gword ptr [rbp-D0H]
       call     MemoryPoolIteratorExtensions:GetMaskAsLong(ref):long
       mov      qword ptr [reloc classVar[0xd1ffab1e]], rax

G_M57955_IG04:
       mov      rcx, 0xD1FFAB1E
       mov      edx, 8
       call     CORINFO_HELP_NEWARR_1_VC
       mov      gword ptr [rbp-D8H], rax
       mov      rcx, 0xD1FFAB1E
       call     CORINFO_HELP_FIELDDESC_TO_STUBRUNTIMEFIELD
       mov      gword ptr [rbp-30H], rax
       mov      rcx, gword ptr [rbp-D8H]
       mov      rdx, gword ptr [rbp-30H]
       call     RuntimeHelpers:InitializeArray(ref,struct)
       mov      rcx, gword ptr [rbp-D8H]
       call     MemoryPoolIteratorExtensions:GetMaskAsLong(ref):long
       mov      qword ptr [reloc classVar[0xd1ffab1e]], rax
       mov      rcx, 0xD1FFAB1E
       mov      edx, 8
       call     CORINFO_HELP_NEWARR_1_OBJ
       mov      gword ptr [rbp-E0H], rax
       mov      rcx, qword ptr [reloc classVar[0xd1ffab1e]]
       mov      qword ptr [rbp-38H], rcx
       mov      rcx, qword ptr [reloc classVar[0xd1ffab1e]]
       mov      qword ptr [rbp-40H], rcx
       mov      rcx, 0xD1FFAB1E
       mov      edx, 19
       call     CORINFO_HELP_GETSHARED_NONGCSTATIC_BASE
       mov      r9, 0xD1FFAB1E
       mov      r9, gword ptr [r9]
       mov      gword ptr [rbp-E8H], r9
       mov      r9, gword ptr [rbp-E8H]
       mov      rdx, qword ptr [rbp-38H]
       mov      r8, qword ptr [rbp-40H]
       mov      rcx, 0xD1FFAB1E
       call     Tuple:Create(long,long,ref):ref
       mov      gword ptr [rbp-F0H], rax
       mov      r8, gword ptr [rbp-F0H]
       mov      rcx, gword ptr [rbp-E0H]
       xor      edx, edx
       call     CORINFO_HELP_ARRADDR_ST
       mov      rcx, qword ptr [reloc classVar[0xd1ffab1e]]
       mov      qword ptr [rbp-48H], rcx
       mov      rcx, qword ptr [reloc classVar[0xd1ffab1e]]
       mov      qword ptr [rbp-50H], rcx
       mov      rcx, 0xD1FFAB1E
       mov      edx, 19
       call     CORINFO_HELP_GETSHARED_NONGCSTATIC_BASE
       mov      r9, 0xD1FFAB1E
       mov      r9, gword ptr [r9]
       mov      gword ptr [rbp-F8H], r9
       mov      r9, gword ptr [rbp-F8H]
       mov      rdx, qword ptr [rbp-48H]
       mov      r8, qword ptr [rbp-50H]

G_M57955_IG05:
       mov      rcx, 0xD1FFAB1E
       call     Tuple:Create(long,long,ref):ref
       mov      gword ptr [rbp-100H], rax
       mov      r8, gword ptr [rbp-100H]
       mov      rcx, gword ptr [rbp-E0H]
       mov      edx, 1
       call     CORINFO_HELP_ARRADDR_ST
       mov      rcx, qword ptr [reloc classVar[0xd1ffab1e]]
       mov      qword ptr [rbp-58H], rcx
       mov      rcx, qword ptr [reloc classVar[0xd1ffab1e]]
       mov      qword ptr [rbp-60H], rcx
       mov      rcx, 0xD1FFAB1E
       mov      edx, 19
       call     CORINFO_HELP_GETSHARED_NONGCSTATIC_BASE
       mov      r9, 0xD1FFAB1E
       mov      r9, gword ptr [r9]
       mov      gword ptr [rbp-108H], r9
       mov      r9, gword ptr [rbp-108H]
       mov      rdx, qword ptr [rbp-58H]
       mov      r8, qword ptr [rbp-60H]
       mov      rcx, 0xD1FFAB1E
       call     Tuple:Create(long,long,ref):ref
       mov      gword ptr [rbp-110H], rax
       mov      r8, gword ptr [rbp-110H]
       mov      rcx, gword ptr [rbp-E0H]
       mov      edx, 2
       call     CORINFO_HELP_ARRADDR_ST
       mov      rcx, qword ptr [reloc classVar[0xd1ffab1e]]
       mov      qword ptr [rbp-68H], rcx
       mov      rcx, qword ptr [reloc classVar[0xd1ffab1e]]
       mov      qword ptr [rbp-70H], rcx
       mov      rcx, 0xD1FFAB1E
       mov      edx, 19
       call     CORINFO_HELP_GETSHARED_NONGCSTATIC_BASE
       mov      r9, 0xD1FFAB1E
       mov      r9, gword ptr [r9]
       mov      gword ptr [rbp-118H], r9
       mov      r9, gword ptr [rbp-118H]
       mov      rdx, qword ptr [rbp-68H]
       mov      r8, qword ptr [rbp-70H]
       mov      rcx, 0xD1FFAB1E
       call     Tuple:Create(long,long,ref):ref
       mov      gword ptr [rbp-120H], rax
       mov      r8, gword ptr [rbp-120H]
       mov      rcx, gword ptr [rbp-E0H]
       mov      edx, 3
       call     CORINFO_HELP_ARRADDR_ST

G_M57955_IG06:
       mov      rcx, qword ptr [reloc classVar[0xd1ffab1e]]
       mov      qword ptr [rbp-78H], rcx
       mov      rcx, qword ptr [reloc classVar[0xd1ffab1e]]
       mov      qword ptr [rbp-80H], rcx
       mov      rcx, 0xD1FFAB1E
       mov      edx, 19
       call     CORINFO_HELP_GETSHARED_NONGCSTATIC_BASE
       mov      r9, 0xD1FFAB1E
       mov      r9, gword ptr [r9]
       mov      gword ptr [rbp-128H], r9
       mov      r9, gword ptr [rbp-128H]
       mov      rdx, qword ptr [rbp-78H]
       mov      r8, qword ptr [rbp-80H]
       mov      rcx, 0xD1FFAB1E
       call     Tuple:Create(long,long,ref):ref
       mov      gword ptr [rbp-130H], rax
       mov      r8, gword ptr [rbp-130H]
       mov      rcx, gword ptr [rbp-E0H]
       mov      edx, 4
       call     CORINFO_HELP_ARRADDR_ST
       mov      rcx, qword ptr [reloc classVar[0xd1ffab1e]]
       mov      qword ptr [rbp-88H], rcx
       mov      rcx, qword ptr [reloc classVar[0xd1ffab1e]]
       mov      qword ptr [rbp-90H], rcx
       mov      rcx, 0xD1FFAB1E
       mov      edx, 19
       call     CORINFO_HELP_GETSHARED_NONGCSTATIC_BASE
       mov      r9, 0xD1FFAB1E
       mov      r9, gword ptr [r9]
       mov      gword ptr [rbp-138H], r9
       mov      r9, gword ptr [rbp-138H]
       mov      rdx, qword ptr [rbp-88H]
       mov      r8, qword ptr [rbp-90H]
       mov      rcx, 0xD1FFAB1E
       call     Tuple:Create(long,long,ref):ref
       mov      gword ptr [rbp-140H], rax
       mov      r8, gword ptr [rbp-140H]
       mov      rcx, gword ptr [rbp-E0H]
       mov      edx, 5
       call     CORINFO_HELP_ARRADDR_ST
       mov      rcx, qword ptr [reloc classVar[0xd1ffab1e]]
       mov      qword ptr [rbp-98H], rcx
       mov      rcx, qword ptr [reloc classVar[0xd1ffab1e]]
       mov      qword ptr [rbp-A0H], rcx
       mov      rcx, 0xD1FFAB1E
       mov      edx, 19
       call     CORINFO_HELP_GETSHARED_NONGCSTATIC_BASE
       mov      r9, 0xD1FFAB1E

G_M57955_IG07:
       mov      r9, gword ptr [r9]
       mov      gword ptr [rbp-148H], r9
       mov      r9, gword ptr [rbp-148H]
       mov      rdx, qword ptr [rbp-98H]
       mov      r8, qword ptr [rbp-A0H]
       mov      rcx, 0xD1FFAB1E
       call     Tuple:Create(long,long,ref):ref
       mov      gword ptr [rbp-150H], rax
       mov      r8, gword ptr [rbp-150H]
       mov      rcx, gword ptr [rbp-E0H]
       mov      edx, 6
       call     CORINFO_HELP_ARRADDR_ST
       mov      rcx, qword ptr [reloc classVar[0xd1ffab1e]]
       mov      qword ptr [rbp-A8H], rcx
       mov      rcx, qword ptr [reloc classVar[0xd1ffab1e]]
       mov      qword ptr [rbp-B0H], rcx
       mov      rcx, 0xD1FFAB1E
       mov      edx, 19
       call     CORINFO_HELP_GETSHARED_NONGCSTATIC_BASE
       mov      r9, 0xD1FFAB1E
       mov      r9, gword ptr [r9]
       mov      gword ptr [rbp-158H], r9
       mov      r9, gword ptr [rbp-158H]
       mov      rdx, qword ptr [rbp-A8H]
       mov      r8, qword ptr [rbp-B0H]
       mov      rcx, 0xD1FFAB1E
       call     Tuple:Create(long,long,ref):ref
       mov      gword ptr [rbp-160H], rax
       mov      r8, gword ptr [rbp-160H]
       mov      rcx, gword ptr [rbp-E0H]
       mov      edx, 7
       call     CORINFO_HELP_ARRADDR_ST
       mov      rcx, 0xD1FFAB1E
       mov      rdx, gword ptr [rbp-E0H]
       call     CORINFO_HELP_CHECKED_ASSIGN_REF
       nop      

G_M57955_IG08:
       lea      rsp, [rbp-08H]
       pop      rdi
       pop      rbp
       ret      

; Total bytes of code 1810, prolog size 33 for method MemoryPoolIteratorExtensions:.cctor()
; ============================================================
Successfully inlined Encoding:get_ASCII():ref (6 IL bytes) (depth 1) [below ALWAYS_INLINE size]
**************** Inline Tree
Inlines into 06000175 MemoryPoolIteratorExtensions:GetAsciiStringAsLong(ref):long
  [1 IL=0000 TR=000001 0600297C] [below ALWAYS_INLINE size] Encoding:get_ASCII():ref
  [0 IL=0006 TR=000005 06002986] [FAILED: target not direct] Encoding:GetBytes(ref):ref:this
Budget: initialTime=126, finalTime=124, initialBudget=1260, currentBudget=1260
Budget: initialSize=632, finalSize=632
; Assembly listing for method MemoryPoolIteratorExtensions:GetAsciiStringAsLong(ref):long
; Emitting BLENDED_CODE for X64 CPU with SSE2
; optimized code
; rsp based frame
; partially interruptible
; Final local variable assignments
;
;  V00 arg0         [V00,T02] (  3,   3  )     ref  ->  rsi        
;  V01 loc0         [V01    ] (  2,   2  )   byref  ->  [rsp+0x28]   must-init pinned
;  V02 tmp0         [V02,T00] (  3,   6  )     ref  ->  rax        
;  V03 tmp1         [V03,T01] (  3,   6  )     ref  ->  rcx        
;  V04 tmp2         [V04,T03] (  2,   4  )    long  ->  rax        
;  V05 OutArgs      [V05    ] (  1,   1  )  lclBlk (32) [rsp+0x00]  
;
; Lcl frame size = 48

G_M42607_IG01:
       push     rsi
       sub      rsp, 48
       xor      rax, rax
       mov      qword ptr [rsp+28H], rax
       mov      rsi, rcx

G_M42607_IG02:
       mov      rcx, 0xD1FFAB1E
       mov      edx, 0x49F
       call     CORINFO_HELP_GETSHARED_NONGCSTATIC_BASE
       mov      rcx, 0xD1FFAB1E
       mov      rcx, gword ptr [rcx]
       mov      rdx, rsi
       mov      rax, qword ptr [rcx]
       mov      rax, qword ptr [rax+88]
       call     gword ptr [rax+8]Encoding:GetBytes(ref):ref:this
       cmp      dword ptr [rax+8], 0
       jbe      SHORT G_M42607_IG04
       add      rax, 16
       mov      bword ptr [rsp+28H], rax
       mov      rax, bword ptr [rsp+28H]
       mov      rax, qword ptr [rax]

G_M42607_IG03:
       add      rsp, 48
       pop      rsi
       ret      

G_M42607_IG04:
       call     CORINFO_HELP_RNGCHKFAIL
       int3     

; Total bytes of code 96, prolog size 12 for method MemoryPoolIteratorExtensions:GetAsciiStringAsLong(ref):long
; ============================================================
**************** Inline Tree
Inlines into 06000176 MemoryPoolIteratorExtensions:GetMaskAsLong(ref):long
Budget: initialTime=141, finalTime=141, initialBudget=1410, currentBudget=1410
Budget: initialSize=746, finalSize=746
; Assembly listing for method MemoryPoolIteratorExtensions:GetMaskAsLong(ref):long
; Emitting BLENDED_CODE for X64 CPU with SSE2
; optimized code
; rsp based frame
; partially interruptible
; Final local variable assignments
;
;  V00 arg0         [V00,T00] (  3,   3  )     ref  ->  rcx        
;  V01 loc0         [V01    ] (  3,   2  )   byref  ->  [rsp+0x20]   must-init pinned
;  V02 loc1         [V02,T02] (  4,   3  )     ref  ->  rax        
;  V03 tmp0         [V03,T01] (  2,   4  )    long  ->  rax        
;  V04 OutArgs      [V04    ] (  1,   1  )  lclBlk (32) [rsp+0x00]  
;  V05 cse0         [V05,T03] (  3,   1.5)     int  ->  rdx        
;
; Lcl frame size = 40

G_M62910_IG01:
       sub      rsp, 40
       xor      rax, rax
       mov      qword ptr [rsp+20H], rax

G_M62910_IG02:
       mov      rax, rcx
       test     rax, rax
       je       SHORT G_M62910_IG03
       mov      edx, dword ptr [rax+8]
       test     edx, edx
       jne      SHORT G_M62910_IG04

G_M62910_IG03:
       xor      rdx, rdx
       mov      bword ptr [rsp+20H], rdx
       jmp      SHORT G_M62910_IG05

G_M62910_IG04:
       cmp      edx, 0
       jbe      SHORT G_M62910_IG07
       add      rax, 16
       mov      bword ptr [rsp+20H], rax

G_M62910_IG05:
       mov      rax, bword ptr [rsp+20H]
       mov      rax, qword ptr [rax]

G_M62910_IG06:
       add      rsp, 40
       ret      

G_M62910_IG07:
       call     CORINFO_HELP_RNGCHKFAIL
       int3     

; Total bytes of code 68, prolog size 11 for method MemoryPoolIteratorExtensions:GetMaskAsLong(ref):long
; ============================================================
; Assembly listing for method HttpMethods:.cctor()
; Emitting BLENDED_CODE for X64 CPU with SSE2
; compiler->opts.MinOpts() is true
; rbp based frame
; partially interruptible
; Final local variable assignments
;
;# V00 OutArgs      [V00    ] (  1,   1  )  lclBlk ( 0) [rsp+0x00]  
;
; Lcl frame size = 0

G_M42390_IG01:
       push     rbp
       mov      rbp, rsp

G_M42390_IG02:
       mov      rdx, 0xD1FFAB1E
       mov      rdx, gword ptr [rdx]
       mov      rcx, 0xD1FFAB1E
       call     CORINFO_HELP_CHECKED_ASSIGN_REF
       mov      rdx, 0xD1FFAB1E
       mov      rdx, gword ptr [rdx]
       mov      rcx, 0xD1FFAB1E
       call     CORINFO_HELP_CHECKED_ASSIGN_REF
       mov      rdx, 0xD1FFAB1E
       mov      rdx, gword ptr [rdx]
       mov      rcx, 0xD1FFAB1E
       call     CORINFO_HELP_CHECKED_ASSIGN_REF
       mov      rdx, 0xD1FFAB1E
       mov      rdx, gword ptr [rdx]
       mov      rcx, 0xD1FFAB1E
       call     CORINFO_HELP_CHECKED_ASSIGN_REF
       mov      rdx, 0xD1FFAB1E
       mov      rdx, gword ptr [rdx]
       mov      rcx, 0xD1FFAB1E
       call     CORINFO_HELP_CHECKED_ASSIGN_REF
       mov      rdx, 0xD1FFAB1E
       mov      rdx, gword ptr [rdx]
       mov      rcx, 0xD1FFAB1E
       call     CORINFO_HELP_CHECKED_ASSIGN_REF
       mov      rdx, 0xD1FFAB1E
       mov      rdx, gword ptr [rdx]
       mov      rcx, 0xD1FFAB1E
       call     CORINFO_HELP_CHECKED_ASSIGN_REF
       mov      rdx, 0xD1FFAB1E
       mov      rdx, gword ptr [rdx]
       mov      rcx, 0xD1FFAB1E
       call     CORINFO_HELP_CHECKED_ASSIGN_REF
       mov      rdx, 0xD1FFAB1E
       mov      rdx, gword ptr [rdx]
       mov      rcx, 0xD1FFAB1E
       call     CORINFO_HELP_CHECKED_ASSIGN_REF
       nop      

G_M42390_IG03:
       pop      rbp
       ret      

; Total bytes of code 259, prolog size 4 for method HttpMethods:.cctor()

@benaadams
Copy link
Copy Markdown
Contributor Author

Can probably use similar for long lengths post vector rather than iterating bytes...

// either directly embed them or use them for branch elimiation.
internal static bool StaticReadonlysJitted;

// Convert these returns to jitted consts
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe use using static here instead?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure what that would get? Each one is from a different type and I'm trying to force their evaluation rather than specifically shorten their names.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Conversations over in #1129 (comment) you might be interested in

@benaadams benaadams force-pushed the De-Bruijn branch 2 times, most recently from a5427b0 to f45af65 Compare October 2, 2016 04:26
@benaadams benaadams changed the title Use De Bruijn sequence for FindFirstEqualByte Use Ben's Magic Number for FindFirstEqualByte Oct 3, 2016
@benaadams benaadams closed this Oct 3, 2016
@benaadams
Copy link
Copy Markdown
Contributor Author

Closed in favour of #1138

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants