src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64ArithmeticOp.java
equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
479 /** |
479 /** |
480 * Computes <code>result = src3 <op> src1 * src2</code>. |
480 * Computes <code>result = src3 <op> src1 * src2</code>. |
481 */ |
481 */ |
482 public MultiplyAddSubOp(AArch64ArithmeticOp op, AllocatableValue result, AllocatableValue src1, AllocatableValue src2, AllocatableValue src3) { |
482 public MultiplyAddSubOp(AArch64ArithmeticOp op, AllocatableValue result, AllocatableValue src1, AllocatableValue src2, AllocatableValue src3) { |
483 super(TYPE); |
483 super(TYPE); |
484 assert op == ADD || op == SUB; |
484 assert op == ADD || op == SUB || op == FADD; |
485 this.op = op; |
485 this.op = op; |
486 this.result = result; |
486 this.result = result; |
487 this.src1 = src1; |
487 this.src1 = src1; |
488 this.src2 = src2; |
488 this.src2 = src2; |
489 this.src3 = src3; |
489 this.src3 = src3; |
497 masm.madd(size, asRegister(result), asRegister(src1), asRegister(src2), asRegister(src3)); |
497 masm.madd(size, asRegister(result), asRegister(src1), asRegister(src2), asRegister(src3)); |
498 break; |
498 break; |
499 case SUB: |
499 case SUB: |
500 masm.msub(size, asRegister(result), asRegister(src1), asRegister(src2), asRegister(src3)); |
500 masm.msub(size, asRegister(result), asRegister(src1), asRegister(src2), asRegister(src3)); |
501 break; |
501 break; |
|
502 case FADD: |
|
503 masm.fmadd(size, asRegister(result), asRegister(src1), asRegister(src2), asRegister(src3)); |
|
504 break; |
502 default: |
505 default: |
503 throw GraalError.shouldNotReachHere(); |
506 throw GraalError.shouldNotReachHere(); |
504 } |
507 } |
505 } |
508 } |
506 } |
509 } |