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

Issue 2771513002: Add pshufw instruction, fix inconsistencies with pextrw instruction. (Closed)

Created:
3 years, 9 months ago by gdeepti
Modified:
3 years, 9 months ago
Reviewers:
bbudge, Mircea Trofin, Jing
CC:
v8-reviews_googlegroups.com
Target Ref:
refs/heads/master
Project:
v8
Visibility:
Public.

Description

Add pshufw instruction, fix inconsistencies with pextrw instruction. Current implementation of the pextrw instruction is the legacy SSE2 instruction in the assembler (66 0F C5), and SSE4 implementation(66 0F 3A 15) in disasm-x64.cc, this causes incorrect instruction encodings to be printed when using --print-code flag for debug, in this case, causes over flow of bytes, and subsequent instructions to be incorrectly disassembled. Fixing to use SSE4 encodings in the assembler cosistent with pextrb, pextrd. R=bbudge@chromium.org, mtrofin@chromium.org Review-Url: https://codereview.chromium.org/2771513002 Cr-Commit-Position: refs/heads/master@{#44047} Committed: https://chromium.googlesource.com/v8/v8/+/9d8d4dfa7dfdd226f63a58e054082817e8f27dc6

Patch Set 1 #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+34 lines, -4 lines) Patch
M src/x64/assembler-x64.h View 1 chunk +3 lines, -0 lines 0 comments Download
M src/x64/assembler-x64.cc View 2 chunks +22 lines, -3 lines 3 comments Download
M src/x64/disasm-x64.cc View 1 chunk +7 lines, -1 line 0 comments Download
M test/cctest/test-disasm-x64.cc View 2 chunks +2 lines, -0 lines 0 comments Download

Messages

Total messages: 15 (9 generated)
gdeepti
3 years, 9 months ago (2017-03-22 18:52:37 UTC) #3
bbudge
LGTM w/comment https://codereview.chromium.org/2771513002/diff/1/src/x64/assembler-x64.cc File src/x64/assembler-x64.cc (right): https://codereview.chromium.org/2771513002/diff/1/src/x64/assembler-x64.cc#newcode2892 src/x64/assembler-x64.cc:2892: DCHECK(is_uint8(imm8)); If I'm reading the docs correctly, ...
3 years, 9 months ago (2017-03-22 19:17:05 UTC) #8
gdeepti
https://codereview.chromium.org/2771513002/diff/1/src/x64/assembler-x64.cc File src/x64/assembler-x64.cc (right): https://codereview.chromium.org/2771513002/diff/1/src/x64/assembler-x64.cc#newcode2892 src/x64/assembler-x64.cc:2892: DCHECK(is_uint8(imm8)); On 2017/03/22 19:17:05, bbudge wrote: > If I'm ...
3 years, 9 months ago (2017-03-22 20:45:34 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2771513002/1
3 years, 9 months ago (2017-03-22 20:48:14 UTC) #11
commit-bot: I haz the power
Committed patchset #1 (id:1) as https://chromium.googlesource.com/v8/v8/+/9d8d4dfa7dfdd226f63a58e054082817e8f27dc6
3 years, 9 months ago (2017-03-22 20:49:35 UTC) #14
bbudge
3 years, 9 months ago (2017-03-22 21:09:40 UTC) #15
Message was sent while issue was closed.
https://codereview.chromium.org/2771513002/diff/1/src/x64/assembler-x64.cc
File src/x64/assembler-x64.cc (right):

https://codereview.chromium.org/2771513002/diff/1/src/x64/assembler-x64.cc#ne...
src/x64/assembler-x64.cc:2892: DCHECK(is_uint8(imm8));
On 2017/03/22 20:45:34, gdeepti wrote:
> On 2017/03/22 19:17:05, bbudge wrote:
> > If I'm reading the docs correctly, this could be even stronger: DCHECK_GT(8,
> > imm8);
> 
> A agree that this check could be stronger, but I'm not sure if the assembler
is
> the right place for the check as the instructions only specifies that the
count
> operand is an 8-bit immediate, and only the 3 least-significant bits are used
> for location. We already check this in the validate function on decode, will
add
> a check in the code generator before it comes to the assembler.  

OK

Powered by Google App Engine
This is Rietveld 408576698