Mercurial > hg > truffle
comparison graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiValueUtil.java @ 4266:e2499e6d8aa7
Merge
author | Lukas Stadler <lukas.stadler@jku.at> |
---|---|
date | Wed, 11 Jan 2012 16:31:46 +0100 |
parents | 1cf920630944 |
children | 9ce8594bedaf |
comparison
equal
deleted
inserted
replaced
4265:4643ccd37dac | 4266:e2499e6d8aa7 |
---|---|
96 | 96 |
97 public static CiRegister asDoubleReg(CiValue value) { | 97 public static CiRegister asDoubleReg(CiValue value) { |
98 assert value.kind == CiKind.Double; | 98 assert value.kind == CiKind.Double; |
99 return asRegister(value); | 99 return asRegister(value); |
100 } | 100 } |
101 | |
102 | |
103 public static boolean sameRegister(CiValue...values) { | |
104 for (int i = 0; i < values.length; i++) { | |
105 for (int j = i + 1; j < values.length; j++) { | |
106 if (isRegister(values[i]) && isRegister(values[j]) && asRegister(values[i]) != asRegister(values[j])) { | |
107 return false; | |
108 } | |
109 } | |
110 } | |
111 return true; | |
112 } | |
113 | |
114 public static boolean differentRegisters(CiValue...values) { | |
115 for (int i = 0; i < values.length; i++) { | |
116 for (int j = i + 1; j < values.length; j++) { | |
117 if (isRegister(values[i]) && isRegister(values[j]) && asRegister(values[i]) == asRegister(values[j])) { | |
118 return false; | |
119 } | |
120 } | |
121 } | |
122 return true; | |
123 } | |
101 } | 124 } |