Mercurial > hg > truffle
diff graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/target/amd64/AMD64CompareOpcode.java @ 4245:75c620f90ab9
Support stack-operands and register hints in new register allocator API
author | Christian Wimmer <Christian.Wimmer@Oracle.com> |
---|---|
date | Sat, 07 Jan 2012 16:04:22 -0800 |
parents | e2578f3e8ab2 |
children | 1cf920630944 |
line wrap: on
line diff
--- a/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/target/amd64/AMD64CompareOpcode.java Fri Jan 06 15:35:52 2012 +0100 +++ b/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/target/amd64/AMD64CompareOpcode.java Sat Jan 07 16:04:22 2012 -0800 @@ -24,6 +24,8 @@ import static com.oracle.max.cri.ci.CiValueUtil.*; +import java.util.*; + import com.oracle.max.asm.target.amd64.*; import com.oracle.max.cri.ci.*; import com.oracle.max.graal.compiler.asm.*; @@ -49,8 +51,11 @@ } @Override - public boolean inputCanBeMemory(int index) { - return index == 1; + public EnumSet<OperandFlag> flagsFor(OperandMode mode, int index) { + if (mode == OperandMode.Input && index == 1) { + return EnumSet.of(OperandFlag.Register, OperandFlag.Stack, OperandFlag.Constant); + } + return super.flagsFor(mode, index); } }; }