2130 |
2130 |
2131 assert(words_pushed == count, "oops, pushed != count"); |
2131 assert(words_pushed == count, "oops, pushed != count"); |
2132 |
2132 |
2133 return count; |
2133 return count; |
2134 } |
2134 } |
|
2135 |
|
2136 // Push lots of registers in the bit set supplied. Don't push sp. |
|
2137 // Return the number of words pushed |
|
2138 int MacroAssembler::push_fp(unsigned int bitset, Register stack) { |
|
2139 int words_pushed = 0; |
|
2140 |
|
2141 // Scan bitset to accumulate register pairs |
|
2142 unsigned char regs[32]; |
|
2143 int count = 0; |
|
2144 for (int reg = 0; reg <= 31; reg++) { |
|
2145 if (1 & bitset) |
|
2146 regs[count++] = reg; |
|
2147 bitset >>= 1; |
|
2148 } |
|
2149 regs[count++] = zr->encoding_nocheck(); |
|
2150 count &= ~1; // Only push an even number of regs |
|
2151 |
|
2152 // Always pushing full 128 bit registers. |
|
2153 if (count) { |
|
2154 stpq(as_FloatRegister(regs[0]), as_FloatRegister(regs[1]), Address(pre(stack, -count * wordSize * 2))); |
|
2155 words_pushed += 2; |
|
2156 } |
|
2157 for (int i = 2; i < count; i += 2) { |
|
2158 stpq(as_FloatRegister(regs[i]), as_FloatRegister(regs[i+1]), Address(stack, i * wordSize * 2)); |
|
2159 words_pushed += 2; |
|
2160 } |
|
2161 |
|
2162 assert(words_pushed == count, "oops, pushed != count"); |
|
2163 return count; |
|
2164 } |
|
2165 |
|
2166 int MacroAssembler::pop_fp(unsigned int bitset, Register stack) { |
|
2167 int words_pushed = 0; |
|
2168 |
|
2169 // Scan bitset to accumulate register pairs |
|
2170 unsigned char regs[32]; |
|
2171 int count = 0; |
|
2172 for (int reg = 0; reg <= 31; reg++) { |
|
2173 if (1 & bitset) |
|
2174 regs[count++] = reg; |
|
2175 bitset >>= 1; |
|
2176 } |
|
2177 regs[count++] = zr->encoding_nocheck(); |
|
2178 count &= ~1; |
|
2179 |
|
2180 for (int i = 2; i < count; i += 2) { |
|
2181 ldpq(as_FloatRegister(regs[i]), as_FloatRegister(regs[i+1]), Address(stack, i * wordSize * 2)); |
|
2182 words_pushed += 2; |
|
2183 } |
|
2184 if (count) { |
|
2185 ldpq(as_FloatRegister(regs[0]), as_FloatRegister(regs[1]), Address(post(stack, count * wordSize * 2))); |
|
2186 words_pushed += 2; |
|
2187 } |
|
2188 |
|
2189 assert(words_pushed == count, "oops, pushed != count"); |
|
2190 |
|
2191 return count; |
|
2192 } |
|
2193 |
2135 #ifdef ASSERT |
2194 #ifdef ASSERT |
2136 void MacroAssembler::verify_heapbase(const char* msg) { |
2195 void MacroAssembler::verify_heapbase(const char* msg) { |
2137 #if 0 |
2196 #if 0 |
2138 assert (UseCompressedOops || UseCompressedClassPointers, "should be compressed"); |
2197 assert (UseCompressedOops || UseCompressedClassPointers, "should be compressed"); |
2139 assert (Universe::heap() != NULL, "java heap should be initialized"); |
2198 assert (Universe::heap() != NULL, "java heap should be initialized"); |