comparison src/cpu/x86/vm/icache_x86.cpp @ 304:dc7f315e41f7

5108146: Merge i486 and amd64 cpu directories 6459804: Want client (c1) compiler for x86_64 (amd64) for faster start-up Reviewed-by: kvn
author never
date Wed, 27 Aug 2008 00:21:55 -0700
parents a61af66fc99e
children 9ee9cf798b59
comparison
equal deleted inserted replaced
303:fa4d1d240383 304:dc7f315e41f7
46 // Other fence and sync instructions won't do the job. 46 // Other fence and sync instructions won't do the job.
47 __ mfence(); 47 __ mfence();
48 48
49 __ bind(flush_line); 49 __ bind(flush_line);
50 __ clflush(Address(addr, 0)); 50 __ clflush(Address(addr, 0));
51 __ addq(addr, ICache::line_size); 51 __ addptr(addr, ICache::line_size);
52 __ decrementl(lines); 52 __ decrementl(lines);
53 __ jcc(Assembler::notZero, flush_line); 53 __ jcc(Assembler::notZero, flush_line);
54 54
55 __ mfence(); 55 __ mfence();
56 56
58 58
59 #else 59 #else
60 const Address magic(rsp, 3*wordSize); 60 const Address magic(rsp, 3*wordSize);
61 __ lock(); __ addl(Address(rsp, 0), 0); 61 __ lock(); __ addl(Address(rsp, 0), 0);
62 #endif // AMD64 62 #endif // AMD64
63 __ movl(rax, magic); // Handshake with caller to make sure it happened! 63 __ movptr(rax, magic); // Handshake with caller to make sure it happened!
64 __ ret(0); 64 __ ret(0);
65 65
66 // Must be set here so StubCodeMark destructor can call the flush stub. 66 // Must be set here so StubCodeMark destructor can call the flush stub.
67 *flush_icache_stub = (ICache::flush_icache_stub_t)start; 67 *flush_icache_stub = (ICache::flush_icache_stub_t)start;
68 } 68 }