Mercurial > hg > truffle
diff graal/GraalCompiler/src/com/sun/c1x/graph/GraphBuilder.java @ 2865:7a4e6e11877f
Subclasses for Shift
author | Gilles Duboscq <gilles.duboscq@oracle.com> |
---|---|
date | Tue, 07 Jun 2011 19:06:20 +0200 |
parents | 45422967cbcf |
children | fc75fd3fa5e4 7d7cf33f8466 |
line wrap: on
line diff
--- a/graal/GraalCompiler/src/com/sun/c1x/graph/GraphBuilder.java Tue Jun 07 17:05:13 2011 +0200 +++ b/graal/GraalCompiler/src/com/sun/c1x/graph/GraphBuilder.java Tue Jun 07 19:06:20 2011 +0200 @@ -554,7 +554,18 @@ private void genShiftOp(CiKind kind, int opcode) { Value s = frameState.ipop(); Value x = frameState.pop(kind); - frameState.push(kind, append(new Shift(opcode, x, s, graph))); + Shift v; + switch(opcode){ + case ISHL: + case LSHL: v = new LeftShift(kind, x, s, graph); break; + case ISHR: + case LSHR: v = new RightShift(kind, x, s, graph); break; + case IUSHR: + case LUSHR: v = new UnsignedRightShift(kind, x, s, graph); break; + default: + throw new CiBailout("should not reach"); + } + frameState.push(kind, append(v)); } private void genLogicOp(CiKind kind, int opcode) {