diff options
author | Vladimir Glazounov <vg@openoffice.org> | 2008-10-01 09:04:58 +0000 |
---|---|---|
committer | Vladimir Glazounov <vg@openoffice.org> | 2008-10-01 09:04:58 +0000 |
commit | 3b2b8f91ff22b93050b9b1aa3da5bd4359182499 (patch) | |
tree | 3e37aa664496da562640735b168da4dcc08bb737 /bridges/source/cpp_uno/cc5_solaris_sparc64 | |
parent | 257b3205cae2665a96492b806df10faf884a4e99 (diff) |
CWS-TOOLING: integrate CWS sb93
Diffstat (limited to 'bridges/source/cpp_uno/cc5_solaris_sparc64')
5 files changed, 9 insertions, 136 deletions
diff --git a/bridges/source/cpp_uno/cc5_solaris_sparc64/doflushcode.hxx b/bridges/source/cpp_uno/cc5_solaris_sparc64/doflushcode.hxx index f21c82e3ba2b..e69de29bb2d1 100644 --- a/bridges/source/cpp_uno/cc5_solaris_sparc64/doflushcode.hxx +++ b/bridges/source/cpp_uno/cc5_solaris_sparc64/doflushcode.hxx @@ -1,39 +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: doflushcode.hxx,v $ - * - * $Revision: 1.3 $ - * - * 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. - * - ************************************************************************/ - -#ifndef INCLUDED_BRIDGES_SOURCE_CPP_UNO_CC5_SOLARIS_SPARC64_DOFLUSHCODE_HXX -#define INCLUDED_BRIDGES_SOURCE_CPP_UNO_CC5_SOLARIS_SPARC64_DOFLUSHCODE_HXX - -#include "sal/config.h" - -extern "C" void doFlushCode(unsigned long address, unsigned long count); - -#endif diff --git a/bridges/source/cpp_uno/cc5_solaris_sparc64/doflushcode.s b/bridges/source/cpp_uno/cc5_solaris_sparc64/doflushcode.s index 9f7ab2ec0b0d..e69de29bb2d1 100644 --- a/bridges/source/cpp_uno/cc5_solaris_sparc64/doflushcode.s +++ b/bridges/source/cpp_uno/cc5_solaris_sparc64/doflushcode.s @@ -1,42 +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: doflushcode.s,v $ - * - * $Revision: 1.3 $ - * - * 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. - * - ************************************************************************/ - -.global doFlushCode -.align 8 -doFlushCode: - flush %o0 - deccc %o1 - bne,pt %xcc, doFlushCode - add %o0, 8, %o0 - retl - nop -.size doFlushCode, . - doFlushCode -.type doFlushCode, #function diff --git a/bridges/source/cpp_uno/cc5_solaris_sparc64/flushcode.cxx b/bridges/source/cpp_uno/cc5_solaris_sparc64/flushcode.cxx index 92096de85162..e69de29bb2d1 100644 --- a/bridges/source/cpp_uno/cc5_solaris_sparc64/flushcode.cxx +++ b/bridges/source/cpp_uno/cc5_solaris_sparc64/flushcode.cxx @@ -1,50 +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.3 $ - * - * 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. - * - ************************************************************************/ - -#include "precompiled_bridges.hxx" -#include "sal/config.h" - -#include "doflushcode.hxx" -#include "flushcode.hxx" - -namespace bridges { namespace cpp_uno { namespace cc5_solaris_sparc64 { - -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/cc5_solaris_sparc64/flushcode.hxx b/bridges/source/cpp_uno/cc5_solaris_sparc64/flushcode.hxx index fdfe65016457..ac87b8200c30 100644 --- a/bridges/source/cpp_uno/cc5_solaris_sparc64/flushcode.hxx +++ b/bridges/source/cpp_uno/cc5_solaris_sparc64/flushcode.hxx @@ -8,7 +8,7 @@ * * $RCSfile: flushcode.hxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.3.18.1 $ * * This file is part of OpenOffice.org. * @@ -34,12 +34,18 @@ #include "sal/config.h" +extern "C" void sync_instruction_memory(caddr_t addr, int len); // from libc + namespace bridges { namespace cpp_uno { namespace cc5_solaris_sparc64 { /** * 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/cc5_solaris_sparc64/makefile.mk b/bridges/source/cpp_uno/cc5_solaris_sparc64/makefile.mk index 94efd7253a2a..f1f98f32ca7d 100644 --- a/bridges/source/cpp_uno/cc5_solaris_sparc64/makefile.mk +++ b/bridges/source/cpp_uno/cc5_solaris_sparc64/makefile.mk @@ -8,7 +8,7 @@ # # $RCSfile: makefile.mk,v $ # -# $Revision: 1.4 $ +# $Revision: 1.4.12.1 $ # # This file is part of OpenOffice.org. # @@ -42,9 +42,7 @@ SHL1TARGET = $(TARGET) SHL1OBJS = \ $(SLO)$/callvirtualmethod.obj \ $(SLO)$/cpp2uno.obj \ - $(SLO)$/doflushcode.obj \ $(SLO)$/exceptions.obj \ - $(SLO)$/flushcode.obj \ $(SLO)$/fp.obj \ $(SLO)$/isdirectreturntype.obj \ $(SLO)$/uno2cpp.obj \ |