diff options
author | Kurt Zenker <kz@openoffice.org> | 2005-01-13 16:44:40 +0000 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2005-01-13 16:44:40 +0000 |
commit | 7f8140869aa52936966bc7dfb6394d73339489c4 (patch) | |
tree | 43b6047833acfa2f249e5a2f12f0eec31a693a54 /bridges | |
parent | 5670e058e9d1fc737ad36c40d8c8bad1102a7f6e (diff) |
INTEGRATION: CWS tbe15 (1.15.54); FILE MERGED
2004/12/17 12:29:40 sb 1.15.54.2: #i25819# Minor optimization.
2004/12/16 15:40:22 sb 1.15.54.1: #i25819# Flush instruction cache.
Diffstat (limited to 'bridges')
-rw-r--r-- | bridges/source/cpp_uno/cc50_solaris_sparc/cpp2uno.cxx | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/bridges/source/cpp_uno/cc50_solaris_sparc/cpp2uno.cxx b/bridges/source/cpp_uno/cc50_solaris_sparc/cpp2uno.cxx index 315fcd158a74..2946def67809 100644 --- a/bridges/source/cpp_uno/cc50_solaris_sparc/cpp2uno.cxx +++ b/bridges/source/cpp_uno/cc50_solaris_sparc/cpp2uno.cxx @@ -2,9 +2,9 @@ * * $RCSfile: cpp2uno.cxx,v $ * - * $Revision: 1.15 $ + * $Revision: 1.16 $ * - * last change: $Author: obo $ $Date: 2004-03-19 13:25:00 $ + * last change: $Author: kz $ $Date: 2005-01-13 17:44:40 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -542,8 +542,15 @@ unsigned char * bridges::cpp_uno::shared::VtableFactory::addLocalFunctions( return code; } +extern "C" void doFlushCode(unsigned long address, unsigned long count); + void bridges::cpp_uno::shared::VtableFactory::flushCode( - unsigned char const *, unsigned char const *) + unsigned char const * begin, unsigned char const * end) { - //TODO: flush the instruction cache (there probably is OS support for this) + unsigned long n = end - begin; + if (n != 0) { + unsigned long adr = reinterpret_cast< unsigned long >(begin); + unsigned long off = adr & 7; + doFlushCode(adr - off, (n + off + 7) >> 3); + } } |