5 * This code is free software; you can redistribute it and/or modify it 6 * under the terms of the GNU General Public License version 2 only, as 7 * published by the Free Software Foundation. 8 * 9 * This code is distributed in the hope that it will be useful, but WITHOUT 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 * 23 */ 24 25 #include "incls/_precompiled.incl" 26 #include "incls/_icache.cpp.incl" 27 28 // The flush stub function address 29 AbstractICache::flush_icache_stub_t AbstractICache::_flush_icache_stub = NULL; 30 31 void AbstractICache::initialize() { 32 // Making this stub must be FIRST use of assembler 33 ResourceMark rm; 34 35 BufferBlob* b = BufferBlob::create("flush_icache_stub", ICache::stub_size); 36 CodeBuffer c(b); 37 38 ICacheStubGenerator g(&c); 39 g.generate_icache_flush(&_flush_icache_stub); 40 41 // The first use of flush_icache_stub must apply it to itself. 42 // The StubCodeMark destructor in generate_icache_flush will 43 // call Assembler::flush, which in turn will call invalidate_range, 44 // which will in turn call the flush stub. Thus we don't need an 45 // explicit call to invalidate_range here. This assumption is 46 // checked in invalidate_range. | 5 * This code is free software; you can redistribute it and/or modify it 6 * under the terms of the GNU General Public License version 2 only, as 7 * published by the Free Software Foundation. 8 * 9 * This code is distributed in the hope that it will be useful, but WITHOUT 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 * 23 */ 24 25 #include "precompiled.hpp" 26 #include "memory/resourceArea.hpp" 27 #include "runtime/icache.hpp" 28 29 // The flush stub function address 30 AbstractICache::flush_icache_stub_t AbstractICache::_flush_icache_stub = NULL; 31 32 void AbstractICache::initialize() { 33 // Making this stub must be FIRST use of assembler 34 ResourceMark rm; 35 36 BufferBlob* b = BufferBlob::create("flush_icache_stub", ICache::stub_size); 37 CodeBuffer c(b); 38 39 ICacheStubGenerator g(&c); 40 g.generate_icache_flush(&_flush_icache_stub); 41 42 // The first use of flush_icache_stub must apply it to itself. 43 // The StubCodeMark destructor in generate_icache_flush will 44 // call Assembler::flush, which in turn will call invalidate_range, 45 // which will in turn call the flush stub. Thus we don't need an 46 // explicit call to invalidate_range here. This assumption is 47 // checked in invalidate_range. |