comparison graal/com.oracle.graal.lir/src/com/oracle/graal/lir/StandardOp.java @ 7353:b5280041f59e

Experiment with soft alignment for branch targets.
author Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
date Sun, 13 Jan 2013 19:32:16 +0100
parents edb4951bc8b5
children 4c6e577d0c01
comparison
equal deleted inserted replaced
7352:00e3c2e4e43c 7353:b5280041f59e
49 * The first operation of every block must implement this interface. 49 * The first operation of every block must implement this interface.
50 */ 50 */
51 public static class LabelOp extends LIRInstruction { 51 public static class LabelOp extends LIRInstruction {
52 private final Label label; 52 private final Label label;
53 private final boolean align; 53 private final boolean align;
54 private final boolean softAlign;
54 55
55 public LabelOp(Label label, boolean align) { 56 public LabelOp(Label label, boolean align, boolean softAlign) {
56 this.label = label; 57 this.label = label;
57 this.align = align; 58 this.align = align;
59 this.softAlign = softAlign;
58 } 60 }
59 61
60 @Override 62 @Override
61 public void emitCode(TargetMethodAssembler tasm) { 63 public void emitCode(TargetMethodAssembler tasm) {
62 if (align) { 64 if (align) {
63 tasm.asm.align(tasm.target.wordSize * 2); 65 tasm.asm.align(tasm.target.wordSize * 2);
66 }
67 if (softAlign) {
68 tasm.asm.softAlign(tasm.target.wordSize * 2);
64 } 69 }
65 tasm.asm.bind(label); 70 tasm.asm.bind(label);
66 } 71 }
67 72
68 public Label getLabel() { 73 public Label getLabel() {