changeset 49373 | 47b5652f2928 |
parent 48089 | 22c9856fc2c2 |
child 49908 | 22eb3e22f245 |
49372:3bb8b00832d0 | 49373:47b5652f2928 |
---|---|
1 /* |
1 /* |
2 * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1997, 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. |
277 |
277 |
278 //------------------------------BoolTest--------------------------------------- |
278 //------------------------------BoolTest--------------------------------------- |
279 // Convert condition codes to a boolean test value (0 or -1). |
279 // Convert condition codes to a boolean test value (0 or -1). |
280 // We pick the values as 3 bits; the low order 2 bits we compare against the |
280 // We pick the values as 3 bits; the low order 2 bits we compare against the |
281 // condition codes, the high bit flips the sense of the result. |
281 // condition codes, the high bit flips the sense of the result. |
282 struct BoolTest VALUE_OBJ_CLASS_SPEC { |
282 struct BoolTest { |
283 enum mask { eq = 0, ne = 4, le = 5, ge = 7, lt = 3, gt = 1, overflow = 2, no_overflow = 6, illegal = 8 }; |
283 enum mask { eq = 0, ne = 4, le = 5, ge = 7, lt = 3, gt = 1, overflow = 2, no_overflow = 6, illegal = 8 }; |
284 mask _test; |
284 mask _test; |
285 BoolTest( mask btm ) : _test(btm) {} |
285 BoolTest( mask btm ) : _test(btm) {} |
286 const Type *cc2logical( const Type *CC ) const; |
286 const Type *cc2logical( const Type *CC ) const; |
287 // Commute the test. I use a small table lookup. The table is created as |
287 // Commute the test. I use a small table lookup. The table is created as |