• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /openjdk9/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.amd64/src/org/graalvm/compiler/core/amd64/

Lines Matching defs:access

91     protected LIRFrameState getState(Access access) {
92 if (access instanceof DeoptimizingNode) {
93 return state((DeoptimizingNode) access);
98 protected AMD64Kind getMemoryKind(Access access) {
99 return (AMD64Kind) gen.getLIRKind(access.asNode().stamp()).getPlatformKind();
102 protected OperandSize getMemorySize(Access access) {
103 switch (getMemoryKind(access)) {
117 throw GraalError.shouldNotReachHere("unsupported memory access type " + getMemoryKind(access));
121 protected ComplexMatchResult emitCompareBranchMemory(IfNode ifNode, CompareNode compare, ValueNode value, Access access) {
123 AMD64Kind kind = getMemoryKind(access);
140 Condition finalCondition = GraphUtil.unproxify(compare.getX()) == access ? cond.mirror() : cond;
149 AMD64AddressValue address = (AMD64AddressValue) operand(access.getAddress());
150 getLIRGeneratorTool().emitCompareBranchMemory(kind, other, address, getState(access), finalCondition, unorderedIsTrue, trueLabel, falseLabel, trueLabelProbability);
156 private ComplexMatchResult emitIntegerTestBranchMemory(IfNode x, ValueNode value, Access access) {
160 AMD64Kind kind = getMemoryKind(access);
169 AMD64AddressValue address = (AMD64AddressValue) operand(access.getAddress());
170 gen.append(new AMD64BinaryConsumer.MemoryConstOp(AMD64MIOp.TEST, size, address, (int) constant.asLong(), getState(access)));
176 AMD64AddressValue address = (AMD64AddressValue) operand(access.getAddress());
177 gen.append(new AMD64BinaryConsumer.MemoryRMOp(AMD64RMOp.TEST, size, gen.asAllocatable(operand(value)), address, getState(access)));
184 protected ComplexMatchResult emitConvertMemoryOp(PlatformKind kind, AMD64RMOp op, OperandSize size, Access access) {
186 AMD64AddressValue address = (AMD64AddressValue) operand(access.getAddress());
187 LIRFrameState state = getState(access);
192 private ComplexMatchResult emitSignExtendMemory(Access access, int fromBits, int toBits) {
234 return emitConvertMemoryOp(kind, op, size, access);
239 private Value emitReinterpretMemory(LIRKind to, Access access) {
240 AMD64AddressValue address = (AMD64AddressValue) operand(access.getAddress());
241 LIRFrameState state = getState(access);
245 @MatchRule("(If (IntegerTest Read=access value))")
246 @MatchRule("(If (IntegerTest FloatingRead=access value))")
247 public ComplexMatchResult integerTestBranchMemory(IfNode root, Access access, ValueNode value) {
248 return emitIntegerTestBranchMemory(root, value, access);
251 @MatchRule("(If (IntegerEquals=compare value Read=access))")
252 @MatchRule("(If (IntegerLessThan=compare value Read=access))")
253 @MatchRule("(If (IntegerBelow=compare value Read=access))")
254 @MatchRule("(If (IntegerEquals=compare value FloatingRead=access))")
255 @MatchRule("(If (IntegerLessThan=compare value FloatingRead=access))")
256 @MatchRule("(If (IntegerBelow=compare value FloatingRead=access))")
257 @MatchRule("(If (FloatEquals=compare value Read=access))")
258 @MatchRule("(If (FloatEquals=compare value FloatingRead=access))")
259 @MatchRule("(If (FloatLessThan=compare value Read=access))")
260 @MatchRule("(If (FloatLessThan=compare value FloatingRead=access))")
261 @MatchRule("(If (PointerEquals=compare value Read=access))")
262 @MatchRule("(If (PointerEquals=compare value FloatingRead=access))")
263 @MatchRule("(If (ObjectEquals=compare value Read=access))")
264 @MatchRule("(If (ObjectEquals=compare value FloatingRead=access))")
265 public ComplexMatchResult ifCompareMemory(IfNode root, CompareNode compare, ValueNode value, Access access) {
266 return emitCompareBranchMemory(root, compare, value, access);
293 private ComplexMatchResult binaryRead(AMD64RMOp op, OperandSize size, ValueNode value, Access access) {
294 return builder -> getArithmeticLIRGenerator().emitBinaryMemory(op, size, getLIRGeneratorTool().asAllocatable(operand(value)), (AMD64AddressValue) operand(access.getAddress()),
295 getState(access));
298 private ComplexMatchResult binaryRead(AMD64RRMOp op, OperandSize size, ValueNode value, Access access) {
299 return builder -> getArithmeticLIRGenerator().emitBinaryMemory(op, size, getLIRGeneratorTool().asAllocatable(operand(value)), (AMD64AddressValue) operand(access.getAddress()),
300 getState(access));
303 @MatchRule("(Add value Read=access)")
304 @MatchRule("(Add value FloatingRead=access)")
305 public ComplexMatchResult addMemory(ValueNode value, Access access) {
306 OperandSize size = getMemorySize(access);
311 return binaryRead(AVXOp.ADD, size, value, access);
313 return binaryRead(SSEOp.ADD, size, value, access);
316 return binaryRead(ADD.getRMOpcode(size), size, value, access);
320 @MatchRule("(Sub value Read=access)")
321 @MatchRule("(Sub value FloatingRead=access)")
322 public ComplexMatchResult subMemory(ValueNode value, Access access) {
323 OperandSize size = getMemorySize(access);
328 return binaryRead(AVXOp.SUB, size, value, access);
330 return binaryRead(SSEOp.SUB, size, value, access);
333 return binaryRead(SUB.getRMOpcode(size), size, value, access);
337 @MatchRule("(Mul value Read=access)")
338 @MatchRule("(Mul value FloatingRead=access)")
339 public ComplexMatchResult mulMemory(ValueNode value, Access access) {
340 OperandSize size = getMemorySize(access);
345 return binaryRead(AVXOp.MUL, size, value, access);
347 return binaryRead(SSEOp.MUL, size, value, access);
350 return binaryRead(AMD64RMOp.IMUL, size, value, access);
354 @MatchRule("(And value Read=access)")
355 @MatchRule("(And value FloatingRead=access)")
356 public ComplexMatchResult andMemory(ValueNode value, Access access) {
357 OperandSize size = getMemorySize(access);
361 return binaryRead(AND.getRMOpcode(size), size, value, access);
365 @MatchRule("(Or value Read=access)")
366 @MatchRule("(Or value FloatingRead=access)")
367 public ComplexMatchResult orMemory(ValueNode value, Access access) {
368 OperandSize size = getMemorySize(access);
372 return binaryRead(OR.getRMOpcode(size), size, value, access);
376 @MatchRule("(Xor value Read=access)")
377 @MatchRule("(Xor value FloatingRead=access)")
378 public ComplexMatchResult xorMemory(ValueNode value, Access access) {
379 OperandSize size = getMemorySize(access);
383 return binaryRead(XOR.getRMOpcode(size), size, value, access);
396 @MatchRule("(SignExtend Read=access)")
397 @MatchRule("(SignExtend FloatingRead=access)")
398 public ComplexMatchResult signExtend(SignExtendNode root, Access access) {
399 return emitSignExtendMemory(access, root.getInputBits(), root.getResultBits());
402 @MatchRule("(ZeroExtend Read=access)")
403 @MatchRule("(ZeroExtend FloatingRead=access)")
404 public ComplexMatchResult zeroExtend(ZeroExtendNode root, Access access) {
405 AMD64Kind memoryKind = getMemoryKind(access);
406 return builder -> getArithmeticLIRGenerator().emitZeroExtendMemory(memoryKind, root.getResultBits(), (AMD64AddressValue) operand(access.getAddress()), getState(access));
409 @MatchRule("(FloatConvert Read=access)")
410 @MatchRule("(FloatConvert FloatingRead=access)")
411 public ComplexMatchResult floatConvert(FloatConvertNode root, Access access) {
414 return emitConvertMemoryOp(AMD64Kind.SINGLE, SSEOp.CVTSD2SS, SD, access);
416 return emitConvertMemoryOp(AMD64Kind.DWORD, SSEOp.CVTTSD2SI, DWORD, access);
418 return emitConvertMemoryOp(AMD64Kind.QWORD, SSEOp.CVTTSD2SI, QWORD, access);
420 return emitConvertMemoryOp(AMD64Kind.DOUBLE, SSEOp.CVTSS2SD, SS, access);
422 return emitConvertMemoryOp(AMD64Kind.DWORD, SSEOp.CVTTSS2SI, DWORD, access);
424 return emitConvertMemoryOp(AMD64Kind.QWORD, SSEOp.CVTTSS2SI, QWORD, access);
426 return emitConvertMemoryOp(AMD64Kind.DOUBLE, SSEOp.CVTSI2SD, DWORD, access);
428 return emitConvertMemoryOp(AMD64Kind.SINGLE, SSEOp.CVTSI2SS, DWORD, access);
430 return emitConvertMemoryOp(AMD64Kind.DOUBLE, SSEOp.CVTSI2SD, QWORD, access);
432 return emitConvertMemoryOp(AMD64Kind.SINGLE, SSEOp.CVTSI2SS, QWORD, access);
438 @MatchRule("(Reinterpret Read=access)")
439 @MatchRule("(Reinterpret FloatingRead=access)")
440 public ComplexMatchResult reinterpret(ReinterpretNode root, Access access) {
443 return emitReinterpretMemory(kind, access);