< prev index next >

src/hotspot/share/opto/regmask.hpp

Print this page

 82 
 83   // SlotsPerLong is 2, since slots are 32 bits and longs are 64 bits.
 84   // Also, consider the maximum alignment size for a normally allocated
 85   // value.  Since we allocate register pairs but not register quads (at
 86   // present), this alignment is SlotsPerLong (== 2).  A normally
 87   // aligned allocated register is either a single register, or a pair
 88   // of adjacent registers, the lower-numbered being even.
 89   // See also is_aligned_Pairs() below, and the padding added before
 90   // Matcher::_new_SP to keep allocated pairs aligned properly.
 91   // If we ever go to quad-word allocations, SlotsPerQuad will become
 92   // the controlling alignment constraint.  Note that this alignment
 93   // requirement is internal to the allocator, and independent of any
 94   // particular platform.
 95   enum { SlotsPerLong = 2,
 96          SlotsPerVecA = 8,
 97          SlotsPerVecS = 1,
 98          SlotsPerVecD = 2,
 99          SlotsPerVecX = 4,
100          SlotsPerVecY = 8,
101          SlotsPerVecZ = 16,
102          SlotsPerRegVmask = 1,
103          };
104 
105   // A constructor only used by the ADLC output.  All mask fields are filled
106   // in directly.  Calls to this look something like RM(1,2,3,4);
107   RegMask(
108 #   define BODY(I) int a##I,
109     FORALL_BODY
110 #   undef BODY
111     int dummy = 0) {
112 #   define BODY(I) _A[I] = a##I;
113     FORALL_BODY
114 #   undef BODY
115     _lwm = 0;
116     _hwm = RM_SIZE - 1;
117     while (_hwm > 0 && _A[_hwm] == 0) _hwm--;
118     while ((_lwm < _hwm) && _A[_lwm] == 0) _lwm++;
119     assert(valid_watermarks(), "post-condition");
120   }
121 
122   // Handy copying constructor

 82 
 83   // SlotsPerLong is 2, since slots are 32 bits and longs are 64 bits.
 84   // Also, consider the maximum alignment size for a normally allocated
 85   // value.  Since we allocate register pairs but not register quads (at
 86   // present), this alignment is SlotsPerLong (== 2).  A normally
 87   // aligned allocated register is either a single register, or a pair
 88   // of adjacent registers, the lower-numbered being even.
 89   // See also is_aligned_Pairs() below, and the padding added before
 90   // Matcher::_new_SP to keep allocated pairs aligned properly.
 91   // If we ever go to quad-word allocations, SlotsPerQuad will become
 92   // the controlling alignment constraint.  Note that this alignment
 93   // requirement is internal to the allocator, and independent of any
 94   // particular platform.
 95   enum { SlotsPerLong = 2,
 96          SlotsPerVecA = 8,
 97          SlotsPerVecS = 1,
 98          SlotsPerVecD = 2,
 99          SlotsPerVecX = 4,
100          SlotsPerVecY = 8,
101          SlotsPerVecZ = 16,

102          };
103 
104   // A constructor only used by the ADLC output.  All mask fields are filled
105   // in directly.  Calls to this look something like RM(1,2,3,4);
106   RegMask(
107 #   define BODY(I) int a##I,
108     FORALL_BODY
109 #   undef BODY
110     int dummy = 0) {
111 #   define BODY(I) _A[I] = a##I;
112     FORALL_BODY
113 #   undef BODY
114     _lwm = 0;
115     _hwm = RM_SIZE - 1;
116     while (_hwm > 0 && _A[_hwm] == 0) _hwm--;
117     while ((_lwm < _hwm) && _A[_lwm] == 0) _lwm++;
118     assert(valid_watermarks(), "post-condition");
119   }
120 
121   // Handy copying constructor
< prev index next >