summaryrefslogtreecommitdiff
path: root/bridges/source/cpp_uno/cc50_solaris_sparc
diff options
context:
space:
mode:
authorVladimir Glazounov <vg@openoffice.org>2008-10-01 09:04:58 +0000
committerVladimir Glazounov <vg@openoffice.org>2008-10-01 09:04:58 +0000
commit3b2b8f91ff22b93050b9b1aa3da5bd4359182499 (patch)
tree3e37aa664496da562640735b168da4dcc08bb737 /bridges/source/cpp_uno/cc50_solaris_sparc
parent257b3205cae2665a96492b806df10faf884a4e99 (diff)
CWS-TOOLING: integrate CWS sb93
Diffstat (limited to 'bridges/source/cpp_uno/cc50_solaris_sparc')
-rw-r--r--bridges/source/cpp_uno/cc50_solaris_sparc/call.s13
-rw-r--r--bridges/source/cpp_uno/cc50_solaris_sparc/flushcode.cxx52
-rw-r--r--bridges/source/cpp_uno/cc50_solaris_sparc/flushcode.hxx10
-rw-r--r--bridges/source/cpp_uno/cc50_solaris_sparc/makefile.mk5
4 files changed, 10 insertions, 70 deletions
diff --git a/bridges/source/cpp_uno/cc50_solaris_sparc/call.s b/bridges/source/cpp_uno/cc50_solaris_sparc/call.s
index c328160927c8..be4027fda070 100644
--- a/bridges/source/cpp_uno/cc50_solaris_sparc/call.s
+++ b/bridges/source/cpp_uno/cc50_solaris_sparc/call.s
@@ -1,16 +1,3 @@
-.global doFlushCode
-.type doFlushCode,2
-doFlushCode:
-.L: flush %o0
- deccc %o1
- bne .L
- add %o0, 8, %o0
- retl
- nop
-.size doFlushCode,(.-doFlushCode)
-.align 8
-
-
.global privateSnippetExecutor
.type privateSnippetExecutor,2
privateSnippetExecutor:
diff --git a/bridges/source/cpp_uno/cc50_solaris_sparc/flushcode.cxx b/bridges/source/cpp_uno/cc50_solaris_sparc/flushcode.cxx
index 211147f8e49f..e69de29bb2d1 100644
--- a/bridges/source/cpp_uno/cc50_solaris_sparc/flushcode.cxx
+++ b/bridges/source/cpp_uno/cc50_solaris_sparc/flushcode.cxx
@@ -1,52 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: flushcode.cxx,v $
- * $Revision: 1.5 $
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_bridges.hxx"
-
-#include "sal/config.h"
-
-#include "flushcode.hxx"
-
-extern "C" void doFlushCode(unsigned long address, unsigned long count);
-
-namespace bridges { namespace cpp_uno { namespace cc50_solaris_sparc {
-
-void flushCode(void const * begin, void const * end) {
- unsigned long n =
- static_cast< char const * >(end) - static_cast< char const * >(begin);
- if (n != 0) {
- unsigned long adr = reinterpret_cast< unsigned long >(begin);
- unsigned long off = adr & 7;
- doFlushCode(adr - off, (n + off + 7) >> 3);
- }
-}
-
-} } }
diff --git a/bridges/source/cpp_uno/cc50_solaris_sparc/flushcode.hxx b/bridges/source/cpp_uno/cc50_solaris_sparc/flushcode.hxx
index 11b7d18b119d..2945bd3648d6 100644
--- a/bridges/source/cpp_uno/cc50_solaris_sparc/flushcode.hxx
+++ b/bridges/source/cpp_uno/cc50_solaris_sparc/flushcode.hxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: flushcode.hxx,v $
- * $Revision: 1.4 $
+ * $Revision: 1.4.20.1 $
*
* This file is part of OpenOffice.org.
*
@@ -33,12 +33,18 @@
#include "sal/config.h"
+extern "C" void sync_instruction_memory(caddr_t addr, int len); // from libc
+
namespace bridges { namespace cpp_uno { namespace cc50_solaris_sparc {
/**
* Flush a region of memory into which code has been written dynamically.
*/
-void flushCode(void const * begin, void const * end);
+inline void flushCode(void const * begin, void const * end) {
+ sync_instruction_memory(
+ static_cast< caddr_t >(const_cast< void * >(begin)),
+ static_cast< char const * >(end) - static_cast< char const * >(begin));
+}
} } }
diff --git a/bridges/source/cpp_uno/cc50_solaris_sparc/makefile.mk b/bridges/source/cpp_uno/cc50_solaris_sparc/makefile.mk
index ee3c69d70ce4..2e569d4f008f 100644
--- a/bridges/source/cpp_uno/cc50_solaris_sparc/makefile.mk
+++ b/bridges/source/cpp_uno/cc50_solaris_sparc/makefile.mk
@@ -8,7 +8,7 @@
#
# $RCSfile: makefile.mk,v $
#
-# $Revision: 1.17 $
+# $Revision: 1.17.12.1 $
#
# This file is part of OpenOffice.org.
#
@@ -58,8 +58,7 @@ SLOFILES= \
$(SLO)$/cpp2uno.obj \
$(SLO)$/uno2cpp.obj \
$(SLO)$/except.obj \
- $(SLO)$/call.obj \
- $(SLO)$/flushcode.obj
+ $(SLO)$/call.obj
SHL1TARGET= $(TARGET)