< prev index next >

src/hotspot/cpu/s390/stubGenerator_s390.cpp

Print this page

2432   void align(bool at_header = false) {
2433     // z/Architecture cache line size is 256 bytes.
2434     // There is no obvious benefit in aligning stub
2435     // code to cache lines. Use CodeEntryAlignment instead.
2436     const unsigned int icache_line_size      = CodeEntryAlignment;
2437     const unsigned int icache_half_line_size = MIN2<unsigned int>(32, CodeEntryAlignment);
2438 
2439     if (at_header) {
2440       while ((intptr_t)(__ pc()) % icache_line_size != 0) {
2441         __ emit_16(0);
2442       }
2443     } else {
2444       while ((intptr_t)(__ pc()) % icache_half_line_size != 0) {
2445         __ z_nop();
2446       }
2447     }
2448   }
2449 
2450 };
2451 
2452 void StubGenerator_generate(CodeBuffer* code, bool all) {
2453   StubGenerator g(code, all);
2454 }

2432   void align(bool at_header = false) {
2433     // z/Architecture cache line size is 256 bytes.
2434     // There is no obvious benefit in aligning stub
2435     // code to cache lines. Use CodeEntryAlignment instead.
2436     const unsigned int icache_line_size      = CodeEntryAlignment;
2437     const unsigned int icache_half_line_size = MIN2<unsigned int>(32, CodeEntryAlignment);
2438 
2439     if (at_header) {
2440       while ((intptr_t)(__ pc()) % icache_line_size != 0) {
2441         __ emit_16(0);
2442       }
2443     } else {
2444       while ((intptr_t)(__ pc()) % icache_half_line_size != 0) {
2445         __ z_nop();
2446       }
2447     }
2448   }
2449 
2450 };
2451 
2452 void StubGenerator_generate(CodeBuffer* code, int phase) {
2453   StubGenerator g(code, phase);
2454 }
< prev index next >