Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(392)

Issue 12920009: Use generated Neon version of MemCopy() on ARM, if platform supports it. (Closed)

Created:
7 years, 9 months ago by Nike
Modified:
7 years, 2 months ago
CC:
v8-dev
Visibility:
Public.

Description

Use generated Neon version of MemCopy() on ARM, if platform supports it. Neon detection is implemented by reading /proc/cpuinfo. Extend ARM assembler with few multiple load/multiple store Neon-specific instructions.

Patch Set 1 : #

Total comments: 15

Patch Set 2 : #

Total comments: 22

Patch Set 3 : #

Total comments: 8
Unified diffs Side-by-side diffs Delta from patch set Stats (+523 lines, -8 lines) Patch
M src/arm/assembler-arm.h View 1 2 3 chunks +69 lines, -0 lines 0 comments Download
M src/arm/assembler-arm.cc View 1 2 3 chunks +289 lines, -0 lines 0 comments Download
M src/arm/codegen-arm.cc View 1 2 1 chunk +150 lines, -1 line 8 comments Download
M src/platform.h View 3 chunks +7 lines, -3 lines 0 comments Download
M src/platform-linux.cc View 1 chunk +3 lines, -0 lines 0 comments Download
M src/platform-posix.cc View 2 chunks +4 lines, -4 lines 0 comments Download
M src/v8globals.h View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 14 (0 generated)
Nike
Neon MemCopy().
7 years, 9 months ago (2013-03-26 12:42:10 UTC) #1
danno
Thanks for the patch. This is going in the right direction, there are quite a ...
7 years, 9 months ago (2013-03-27 08:40:07 UTC) #2
Jakob Kummerow
What happened to "we don't use the NEON unit so that it can stay powered ...
7 years, 8 months ago (2013-03-27 22:51:34 UTC) #3
danno
It's my understanding that SVG uses NEON all the time, so it's already powered up ...
7 years, 8 months ago (2013-03-27 22:57:03 UTC) #4
hans
On 2013/03/27 22:57:03, danno wrote: > It's my understanding that SVG uses NEON all the ...
7 years, 8 months ago (2013-03-28 14:39:26 UTC) #5
Nike
I see few points, why runtime generation of MemCopy() copy could be desirable. - we ...
7 years, 8 months ago (2013-03-29 08:21:51 UTC) #6
Nike
PTAL https://codereview.chromium.org/12920009/diff/3002/src/arm/assembler-arm.cc File src/arm/assembler-arm.cc (right): https://codereview.chromium.org/12920009/diff/3002/src/arm/assembler-arm.cc#newcode2667 src/arm/assembler-arm.cc:2667: On 2013/03/27 08:40:07, danno wrote: > nit: coding ...
7 years, 8 months ago (2013-03-29 08:48:52 UTC) #7
hans
I've got some style nits mostly. I still haven't penetrated the actual copy routine or ...
7 years, 8 months ago (2013-04-02 12:34:29 UTC) #8
Nike
Hopefully covered most of Hans suggestions, PTAL. https://codereview.chromium.org/12920009/diff/17001/src/arm/assembler-arm.cc File src/arm/assembler-arm.cc (right): https://codereview.chromium.org/12920009/diff/17001/src/arm/assembler-arm.cc#newcode1605 src/arm/assembler-arm.cc:1605: void Assembler::pld(Register ...
7 years, 8 months ago (2013-04-03 15:04:06 UTC) #9
hans
https://codereview.chromium.org/12920009/diff/17001/src/arm/assembler-arm.cc File src/arm/assembler-arm.cc (right): https://codereview.chromium.org/12920009/diff/17001/src/arm/assembler-arm.cc#newcode1605 src/arm/assembler-arm.cc:1605: void Assembler::pld(Register base, int offset, int write) { On ...
7 years, 8 months ago (2013-04-04 09:56:51 UTC) #10
hans
On 2013/04/04 09:56:51, hans wrote: > > is it OK to make simulator+test changes in ...
7 years, 8 months ago (2013-04-05 09:33:15 UTC) #11
Nike
Sure, once I'll complete with tests and disassembler support (got really busy with other projects), ...
7 years, 8 months ago (2013-04-12 14:50:12 UTC) #12
ulan
Added Rodolph and myself to reviewers. High level question: did you run the benchmarks (Octane, ...
7 years, 8 months ago (2013-04-26 14:21:31 UTC) #13
Rodolph Perfetta
7 years, 7 months ago (2013-04-30 17:08:36 UTC) #14
comments for the neon code.

We have a similar patch in the work (stalled for now), let us know if you are
interested in merging our efforts.

https://codereview.chromium.org/12920009/diff/23001/src/arm/codegen-arm.cc
File src/arm/codegen-arm.cc (right):

https://codereview.chromium.org/12920009/diff/23001/src/arm/codegen-arm.cc#ne...
src/arm/codegen-arm.cc:124: static const int kCacheLineSize = 64;
This is true on A8 and A15 but not A9.

https://codereview.chromium.org/12920009/diff/23001/src/arm/codegen-arm.cc#ne...
src/arm/codegen-arm.cc:155: ASSERT(OS::kMinComplexMemCopy >= 16);
STATIC_ASSERT

https://codereview.chromium.org/12920009/diff/23001/src/arm/codegen-arm.cc#ne...
src/arm/codegen-arm.cc:173: __ ldrb(lr, MemOperand(r1, 1, PostIndex), cs);
use ldrh instead of 2 ldrb.

Same for stores.

https://codereview.chromium.org/12920009/diff/23001/src/arm/codegen-arm.cc#ne...
src/arm/codegen-arm.cc:179: __ vld4(8, r1, d0, element_0, Writeback);
I am not sure why you are using vld4. Currently you are loading a byte into
d0[0], the next byte into d1[0], etc. So you are touching 4 double registers to
load 4 bytes. If you want to load a word then use ldr. It also saves you
implementing vld4 in the assembler/disasm/simulator.

If you want to avoid mixing arm/neon then you should also get rid of he
ldrb/strb above.

https://codereview.chromium.org/12920009/diff/23001/src/arm/codegen-arm.cc#ne...
src/arm/codegen-arm.cc:226: __ b(&has32, hs);
If I followed correctly when you enter the has32 block, you know that 32 <= r2 <
64, so this branch will never be taken.

https://codereview.chromium.org/12920009/diff/23001/src/arm/codegen-arm.cc#ne...
src/arm/codegen-arm.cc:244: __ b(&skip_copy4, ge);
ge implies N flag == V flag, shift with SetCC don't touch the overflow flag so
you probably meant to use pl (N clear).

https://codereview.chromium.org/12920009/diff/23001/src/arm/codegen-arm.cc#ne...
src/arm/codegen-arm.cc:251: __ ldrb(lr, MemOperand(r1, 1, PostIndex), cs);
ldrh, then strh below.

https://codereview.chromium.org/12920009/diff/23001/src/arm/codegen-arm.cc#ne...
src/arm/codegen-arm.cc:257: __ bx(lr);
You can combine both operations above with:
  __ pop(pc);

Powered by Google App Engine
This is Rietveld 408576698