Mercurial > hg > graal-jvmci-8
comparison graal/GraalCompiler/src/com/sun/c1x/graph/GraphBuilder.java @ 2853:0635ba16afe4
Reintroduce Logic subclasses, creating some Canonicalization related classes
author | Gilles Duboscq <gilles.duboscq@oracle.com> |
---|---|
date | Tue, 07 Jun 2011 15:52:55 +0200 |
parents | c6bdec623ef9 |
children | a97605b0489b |
comparison
equal
deleted
inserted
replaced
2852:c6bdec623ef9 | 2853:0635ba16afe4 |
---|---|
558 } | 558 } |
559 | 559 |
560 private void genLogicOp(CiKind kind, int opcode) { | 560 private void genLogicOp(CiKind kind, int opcode) { |
561 Value y = frameState.pop(kind); | 561 Value y = frameState.pop(kind); |
562 Value x = frameState.pop(kind); | 562 Value x = frameState.pop(kind); |
563 frameState.push(kind, append(new Logic(opcode, x, y, graph))); | 563 Logic v; |
564 switch(opcode){ | |
565 case IAND: | |
566 case LAND: v = new And(kind, x, y, graph); break; | |
567 case IOR: | |
568 case LOR: v = new Or(kind, x, y, graph); break; | |
569 case IXOR: | |
570 case LXOR: v = new Xor(kind, x, y, graph); break; | |
571 default: | |
572 throw new CiBailout("should not reach"); | |
573 } | |
574 frameState.push(kind, append(v)); | |
564 } | 575 } |
565 | 576 |
566 private void genCompareOp(CiKind kind, int opcode, CiKind resultKind) { | 577 private void genCompareOp(CiKind kind, int opcode, CiKind resultKind) { |
567 Value y = frameState.pop(kind); | 578 Value y = frameState.pop(kind); |
568 Value x = frameState.pop(kind); | 579 Value x = frameState.pop(kind); |