Mercurial > hg > graal-compiler
comparison src/cpu/sparc/vm/stubGenerator_sparc.cpp @ 17939:0fb5b60ab4a2
8022070: Compilation error in stubGenerator_sparc.cpp with some compilers
Reviewed-by: twisti, kvn
author | mikael |
---|---|
date | Tue, 29 Apr 2014 22:04:09 -0700 |
parents | 03214612e77e |
children | 0342d80559e0 |
comparison
equal
deleted
inserted
replaced
17938:1555c0843770 | 17939:0fb5b60ab4a2 |
---|---|
81 | 81 |
82 class StubGenerator: public StubCodeGenerator { | 82 class StubGenerator: public StubCodeGenerator { |
83 private: | 83 private: |
84 | 84 |
85 #ifdef PRODUCT | 85 #ifdef PRODUCT |
86 #define inc_counter_np(a,b,c) (0) | 86 #define inc_counter_np(a,b,c) |
87 #else | 87 #else |
88 #define inc_counter_np(counter, t1, t2) \ | 88 #define inc_counter_np(counter, t1, t2) \ |
89 BLOCK_COMMENT("inc_counter " #counter); \ | 89 BLOCK_COMMENT("inc_counter " #counter); \ |
90 __ inc_counter(&counter, t1, t2); | 90 __ inc_counter(&counter, t1, t2); |
91 #endif | 91 #endif |
1053 // | 1053 // |
1054 typedef void (StubGenerator::*CopyLoopFunc)(Register from, Register to, Register count, int count_dec, | 1054 typedef void (StubGenerator::*CopyLoopFunc)(Register from, Register to, Register count, int count_dec, |
1055 Label& L_loop, bool use_prefetch, bool use_bis); | 1055 Label& L_loop, bool use_prefetch, bool use_bis); |
1056 | 1056 |
1057 void disjoint_copy_core(Register from, Register to, Register count, int log2_elem_size, | 1057 void disjoint_copy_core(Register from, Register to, Register count, int log2_elem_size, |
1058 int iter_size, CopyLoopFunc copy_loop_func) { | 1058 int iter_size, StubGenerator::CopyLoopFunc copy_loop_func) { |
1059 Label L_copy; | 1059 Label L_copy; |
1060 | 1060 |
1061 assert(log2_elem_size <= 3, "the following code should be changed"); | 1061 assert(log2_elem_size <= 3, "the following code should be changed"); |
1062 int count_dec = 16>>log2_elem_size; | 1062 int count_dec = 16>>log2_elem_size; |
1063 | 1063 |
1204 __ andn(from, 7, from); // Align address | 1204 __ andn(from, 7, from); // Align address |
1205 __ ldx(from, 0, O3); | 1205 __ ldx(from, 0, O3); |
1206 __ inc(from, 8); | 1206 __ inc(from, 8); |
1207 __ sllx(O3, left_shift, O3); | 1207 __ sllx(O3, left_shift, O3); |
1208 | 1208 |
1209 disjoint_copy_core(from, to, count, log2_elem_size, 16, copy_16_bytes_shift_loop); | 1209 disjoint_copy_core(from, to, count, log2_elem_size, 16, &StubGenerator::copy_16_bytes_shift_loop); |
1210 | 1210 |
1211 __ inccc(count, count_dec>>1 ); // + 8 bytes | 1211 __ inccc(count, count_dec>>1 ); // + 8 bytes |
1212 __ brx(Assembler::negative, true, Assembler::pn, L_copy_last_bytes); | 1212 __ brx(Assembler::negative, true, Assembler::pn, L_copy_last_bytes); |
1213 __ delayed()->inc(count, count_dec>>1); // restore 'count' | 1213 __ delayed()->inc(count, count_dec>>1); // restore 'count' |
1214 | 1214 |
2083 | 2083 |
2084 // copy with shift 4 elements (16 bytes) at a time | 2084 // copy with shift 4 elements (16 bytes) at a time |
2085 __ dec(count, 4); // The cmp at the beginning guaranty count >= 4 | 2085 __ dec(count, 4); // The cmp at the beginning guaranty count >= 4 |
2086 __ sllx(O3, 32, O3); | 2086 __ sllx(O3, 32, O3); |
2087 | 2087 |
2088 disjoint_copy_core(from, to, count, 2, 16, copy_16_bytes_loop); | 2088 disjoint_copy_core(from, to, count, 2, 16, &StubGenerator::copy_16_bytes_loop); |
2089 | 2089 |
2090 __ br(Assembler::always, false, Assembler::pt, L_copy_4_bytes); | 2090 __ br(Assembler::always, false, Assembler::pt, L_copy_4_bytes); |
2091 __ delayed()->inc(count, 4); // restore 'count' | 2091 __ delayed()->inc(count, 4); // restore 'count' |
2092 | 2092 |
2093 __ BIND(L_aligned_copy); | 2093 __ BIND(L_aligned_copy); |
2364 // Now we can use O4(offset0), O5(offset8) as temps | 2364 // Now we can use O4(offset0), O5(offset8) as temps |
2365 __ mov(O3, count); | 2365 __ mov(O3, count); |
2366 // count >= 0 (original count - 8) | 2366 // count >= 0 (original count - 8) |
2367 __ mov(from, from64); | 2367 __ mov(from, from64); |
2368 | 2368 |
2369 disjoint_copy_core(from64, to64, count, 3, 64, copy_64_bytes_loop); | 2369 disjoint_copy_core(from64, to64, count, 3, 64, &StubGenerator::copy_64_bytes_loop); |
2370 | 2370 |
2371 // Restore O4(offset0), O5(offset8) | 2371 // Restore O4(offset0), O5(offset8) |
2372 __ sub(from64, from, offset0); | 2372 __ sub(from64, from, offset0); |
2373 __ inccc(count, 6); // restore count | 2373 __ inccc(count, 6); // restore count |
2374 __ brx(Assembler::negative, false, Assembler::pn, L_copy_8_bytes ); | 2374 __ brx(Assembler::negative, false, Assembler::pn, L_copy_8_bytes ); |