summaryrefslogtreecommitdiff
path: root/bridges/source/cpp_uno/gcc3_linux_sparc
diff options
context:
space:
mode:
authorRüdiger Timm <rt@openoffice.org>2005-05-11 10:04:23 +0000
committerRüdiger Timm <rt@openoffice.org>2005-05-11 10:04:23 +0000
commit4e439f13ce054d726764c3c67af8064e3da36c1f (patch)
tree430deaa509c822c633f9f2ab7f51841b66ebf228 /bridges/source/cpp_uno/gcc3_linux_sparc
parent8945c9bb597b0881a0d8d77144e19e4a788d6862 (diff)
INTEGRATION: CWS unxlngs02 (1.6.20); FILE MERGED
2005/04/27 06:21:06 sparcmoz 1.6.20.1: #i42799# Flush instruction cache in bridges/cpp_uno for linux sparc
Diffstat (limited to 'bridges/source/cpp_uno/gcc3_linux_sparc')
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_sparc/cpp2uno.cxx19
1 files changed, 14 insertions, 5 deletions
diff --git a/bridges/source/cpp_uno/gcc3_linux_sparc/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_linux_sparc/cpp2uno.cxx
index 3742b5a4662b..5b1a60ab7541 100644
--- a/bridges/source/cpp_uno/gcc3_linux_sparc/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_sparc/cpp2uno.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: cpp2uno.cxx,v $
*
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
- * last change: $Author: obo $ $Date: 2005-01-25 13:11:46 $
+ * last change: $Author: rt $ $Date: 2005-05-11 11:04:23 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -577,8 +577,17 @@ unsigned char * bridges::cpp_uno::shared::VtableFactory::addLocalFunctions(
return code;
}
+// use flush code from cc50_solaris_sparc
+
+extern "C" void doFlushCode(unsigned long address, unsigned long count);
+
void bridges::cpp_uno::shared::VtableFactory::flushCode(
- unsigned char const *, unsigned char const *)
- {
- //TODO: IZ 25819 flush the instruction cache (there probably is OS support for this)
+ unsigned char const * begin, unsigned char const * end)
+{
+ 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);
}
+}