468 } 469 470 @Override 471 public void emitStore(ValueKind<?> lirKind, Value address, Value inputVal, LIRFrameState state) { 472 AArch64AddressValue storeAddress = getLIRGen().asAddressValue(address); 473 AArch64Kind kind = (AArch64Kind) lirKind.getPlatformKind(); 474 475 if (isJavaConstant(inputVal) && kind.isInteger()) { 476 JavaConstant c = asJavaConstant(inputVal); 477 if (c.isDefaultForKind()) { 478 // We can load 0 directly into integer registers 479 getLIRGen().append(new StoreConstantOp(kind, storeAddress, c, state)); 480 return; 481 } 482 } 483 AllocatableValue input = asAllocatable(inputVal); 484 getLIRGen().append(new StoreOp(kind, storeAddress, input, state)); 485 } 486 487 @Override 488 public Value emitMathLog(Value input, boolean base10) { 489 throw GraalError.unimplemented(); 490 } 491 492 @Override 493 public Value emitMathCos(Value input) { 494 throw GraalError.unimplemented(); 495 } 496 497 @Override 498 public Value emitMathSin(Value input) { 499 throw GraalError.unimplemented(); 500 } 501 502 @Override 503 public Value emitMathTan(Value input) { 504 throw GraalError.unimplemented(); 505 } 506 507 @Override 508 public void emitCompareOp(AArch64Kind cmpKind, Variable left, Value right) { 509 throw GraalError.unimplemented(); 510 } 511 512 @Override 513 public Value emitRound(Value value, RoundingMode mode) { 514 AArch64ArithmeticOp op; 515 switch (mode) { 516 case NEAREST: 517 op = AArch64ArithmeticOp.FRINTN; 518 break; 519 case UP: 520 op = AArch64ArithmeticOp.FRINTP; 521 break; 522 case DOWN: 523 op = AArch64ArithmeticOp.FRINTM; 524 break; 525 default: 526 throw GraalError.shouldNotReachHere(); 527 } | 468 } 469 470 @Override 471 public void emitStore(ValueKind<?> lirKind, Value address, Value inputVal, LIRFrameState state) { 472 AArch64AddressValue storeAddress = getLIRGen().asAddressValue(address); 473 AArch64Kind kind = (AArch64Kind) lirKind.getPlatformKind(); 474 475 if (isJavaConstant(inputVal) && kind.isInteger()) { 476 JavaConstant c = asJavaConstant(inputVal); 477 if (c.isDefaultForKind()) { 478 // We can load 0 directly into integer registers 479 getLIRGen().append(new StoreConstantOp(kind, storeAddress, c, state)); 480 return; 481 } 482 } 483 AllocatableValue input = asAllocatable(inputVal); 484 getLIRGen().append(new StoreOp(kind, storeAddress, input, state)); 485 } 486 487 @Override 488 public void emitCompareOp(AArch64Kind cmpKind, Variable left, Value right) { 489 throw GraalError.unimplemented(); 490 } 491 492 @Override 493 public Value emitRound(Value value, RoundingMode mode) { 494 AArch64ArithmeticOp op; 495 switch (mode) { 496 case NEAREST: 497 op = AArch64ArithmeticOp.FRINTN; 498 break; 499 case UP: 500 op = AArch64ArithmeticOp.FRINTP; 501 break; 502 case DOWN: 503 op = AArch64ArithmeticOp.FRINTM; 504 break; 505 default: 506 throw GraalError.shouldNotReachHere(); 507 } |