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

Issue 656983002: emitIAS for Shld and Shrd and the ternary and three-address ops. (Closed)

Created:
6 years, 2 months ago by jvoung (off chromium)
Modified:
6 years, 2 months ago
Reviewers:
Jim Stichnoth
CC:
native-client-reviews_googlegroups.com
Base URL:
https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Visibility:
Public.

Description

emitIAS for Shld and Shrd and the ternary and three-address ops. Give a different name to the crosstest .s and .o files depending on the CPU features as well. That way the SSE2 and SSE4.1 .s and .o are separate. The encodings for Pextrw and Pextrb/d... make me sad. BUG=none R=stichnot@chromium.org Committed: https://gerrit.chromium.org/gerrit/gitweb?p=native_client/pnacl-subzero.git;a=commit;h=962befa4684fabfcc49742cef605f0e8c7372dde

Patch Set 1 #

Patch Set 2 : stuff #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+510 lines, -26 lines) Patch
M pydir/crosstest.py View 1 chunk +1 line, -1 line 0 comments Download
M src/IceInstX8632.h View 5 chunks +10 lines, -2 lines 0 comments Download
M src/IceInstX8632.cpp View 1 8 chunks +164 lines, -2 lines 3 comments Download
M src/assembler_ia32.h View 1 5 chunks +51 lines, -9 lines 0 comments Download
M src/assembler_ia32.cpp View 1 3 chunks +150 lines, -12 lines 0 comments Download
M tests_lit/assembler/x86/opcode_register_encodings.ll View 1 chunk +134 lines, -0 lines 0 comments Download

Messages

Total messages: 6 (1 generated)
jvoung (off chromium)
6 years, 2 months ago (2014-10-15 00:28:31 UTC) #2
Jim Stichnoth
lgtm https://codereview.chromium.org/656983002/diff/20001/src/IceInstX8632.cpp File src/IceInstX8632.cpp (right): https://codereview.chromium.org/656983002/diff/20001/src/IceInstX8632.cpp#newcode2337 src/IceInstX8632.cpp:2337: // them all to have a register dest ...
6 years, 2 months ago (2014-10-15 02:09:28 UTC) #3
jvoung (off chromium)
https://codereview.chromium.org/656983002/diff/20001/src/IceInstX8632.cpp File src/IceInstX8632.cpp (right): https://codereview.chromium.org/656983002/diff/20001/src/IceInstX8632.cpp#newcode2337 src/IceInstX8632.cpp:2337: // them all to have a register dest for ...
6 years, 2 months ago (2014-10-15 16:23:44 UTC) #4
jvoung (off chromium)
Committed patchset #2 (id:20001) manually as 962befa4684fabfcc49742cef605f0e8c7372dde (presubmit successful).
6 years, 2 months ago (2014-10-15 16:33:03 UTC) #5
Jim Stichnoth
6 years, 2 months ago (2014-10-15 16:45:59 UTC) #6
Message was sent while issue was closed.
https://codereview.chromium.org/656983002/diff/20001/src/IceInstX8632.cpp
File src/IceInstX8632.cpp (right):

https://codereview.chromium.org/656983002/diff/20001/src/IceInstX8632.cpp#new...
src/IceInstX8632.cpp:2337: // them all to have a register dest for now.
On 2014/10/15 16:23:43, jvoung wrote:
> On 2014/10/15 02:09:27, stichnot wrote:
> > Just wondering if you've thought about what happens if down the road we
start
> > trying to generate these kinds of not-yet-supported instructions?  I guess
we
> > can impose temporary restrictions in the lowering code via legalize(), or in
> the
> > peephole optimizations or whatever, until the support is there?
> 
> 
> I think we would have to impose some legalizations temporarily, yes. I'm not
> sure how that would work if there was a big change in lowering though, so it
> could end up being a separate pass =(
> 
> Otherwise, I can try to prepare for switches by at least adding the
> assembler_ia32.h/cpp functions (but not used). I think the linker could help
us
> prune the functions that aren't used, but will have to check again.
> 
> We are okay for most of the XMM ones, because they tend to only support dest
==
> reg in the encodings.
> 
> We'll have some problems in some cases like this, and for some of the GPR
> binops. The GPR binops we can handle more quickly, because they mostly go
> through the common emit function. The common emit function could be changed to
> be more like Icmp where it has dispatching for dest == mem. The slow work is
in
> adding all the assembler_ia32.h/cpp functions, I think.

After writing my comment, I convinced myself that we will be fine and legalize()
can work around until the encoding is available.  Similar things have happened,
e.g. working around the llvm-mc lea bug.

As long as ias has reasonable assertions, it should probably be fine.

Powered by Google App Engine
This is Rietveld 408576698