1 /* |
1 /* |
2 * Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2000, 2018, 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. |
753 |
753 |
754 // Limit result register mask to acceptable registers |
754 // Limit result register mask to acceptable registers |
755 const RegMask &rm = n->out_RegMask(); |
755 const RegMask &rm = n->out_RegMask(); |
756 lrg.AND( rm ); |
756 lrg.AND( rm ); |
757 |
757 |
758 int ireg = n->ideal_reg(); |
758 uint ireg = n->ideal_reg(); |
759 assert( !n->bottom_type()->isa_oop_ptr() || ireg == Op_RegP, |
759 assert( !n->bottom_type()->isa_oop_ptr() || ireg == Op_RegP, |
760 "oops must be in Op_RegP's" ); |
760 "oops must be in Op_RegP's" ); |
761 |
761 |
762 // Check for vector live range (only if vector register is used). |
762 // Check for vector live range (only if vector register is used). |
763 // On SPARC vector uses RegD which could be misaligned so it is not |
763 // On SPARC vector uses RegD which could be misaligned so it is not |
959 lrg.AND( rm ); |
959 lrg.AND( rm ); |
960 } |
960 } |
961 |
961 |
962 // Check for bound register masks |
962 // Check for bound register masks |
963 const RegMask &lrgmask = lrg.mask(); |
963 const RegMask &lrgmask = lrg.mask(); |
964 int kreg = n->in(k)->ideal_reg(); |
964 uint kreg = n->in(k)->ideal_reg(); |
965 bool is_vect = RegMask::is_vector(kreg); |
965 bool is_vect = RegMask::is_vector(kreg); |
966 assert(n->in(k)->bottom_type()->isa_vect() == NULL || |
966 assert(n->in(k)->bottom_type()->isa_vect() == NULL || |
967 is_vect || kreg == Op_RegD || kreg == Op_RegL, |
967 is_vect || kreg == Op_RegD || kreg == Op_RegL, |
968 "vector must be in vector registers"); |
968 "vector must be in vector registers"); |
969 if (lrgmask.is_bound(kreg)) |
969 if (lrgmask.is_bound(kreg)) |