New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 620273 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Last visit > 30 days ago
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocking:
issue 618598



Sign in to add a comment

CodeStubAssembler should improve code generation on ia32

Project Member Reported by ishell@chromium.org, Jun 15 2016

Issue description

The code of LoadICTFStub on ia32 is bad: because of poor instruction selection it requires
more registers and therefore a frame.

This CL (https://codereview.chromium.org/2069003002/) creates a part of the LoadIC stub that
shows the following problems:

1) The comparison of memory with a constant currently requires a register. See instructions 61-66.

2) If we fold precomputed offset with the load instruction we could avoid using one register: See instructions 42-49.
   I would like to see here "mov eax,[ebx+eax*2+0x7]" instead.


     -- B0 start (construct frame) --
  0  55             push ebp
  1  89e5           mov ebp,esp
  3  6a14           push 0x14
  5  83ec10         sub esp,0x10
  8  8955f8         mov [ebp-0x8],edx
 11  894df4         mov [ebp-0xc],ecx
 14  8945f0         mov [ebp-0x10],eax
 17  8975ec         mov [ebp-0x14],esi
 20  f6c201         test_b dl,0x1
 23  0f8408000000   jz 37  (0x46c56085)
     -- B1 start --
 29  8b7aff         mov edi,[edx-0x1]
 32  e905000000     jmp 42  (0x46c5608a)
     -- B2 start --
 37  bfb982a045     mov edi,0x45a082b9          ;; object: 0x45a082b9 <Map(FAST_HOLEY_ELEMENTS)>
     -- B3 start --
 42  8d0c4507000000 lea ecx,[eax*2+0x7]
 49  8b0419         mov eax,[ecx+ebx*1]
 52  397803         cmp [eax+0x3],edi
 55  0f84a4000000   jz 225  (0x46c56141)
     -- B4 start --
 61  b98581a045     mov ecx,0x45a08185          ;; object: 0x45a08185 <Map(FAST_HOLEY_ELEMENTS)>
 66  3948ff         cmp [eax-0x1],ecx
 69  0f8558000000   jnz 163  (0x46c56103)
     -- B5 start --
     -- B6 start --
 75  8b4807         mov ecx,[eax+0x7]
 78  397903         cmp [ecx+0x3],edi
 81  0f8508000000   jnz 95  (0x46c560bf)
     -- B7 start --
 87  8b400b         mov eax,[eax+0xb]
 90  e986000000     jmp 229  (0x46c56145)
     -- B8 start --
 95  8b480f         mov ecx,[eax+0xf]
 98  397903         cmp [ecx+0x3],edi
101  0f8508000000   jnz 115  (0x46c560d3)

 

Comment 1 by ishell@chromium.org, Jun 15 2016

Build the test in release mode.

Sign in to add a comment