You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by ji...@apache.org on 2020/12/01 23:06:23 UTC
[openoffice] branch AOO42X updated (37f4cb1 -> 45fed17)
This is an automated email from the ASF dual-hosted git repository.
jim pushed a change to branch AOO42X
in repository https://gitbox.apache.org/repos/asf/openoffice.git.
from 37f4cb1 Huge updates to macOS UNO bridges, based on FreeBSD and Linux.
new 93a8176 Move ASM back into file... weird linking issues w/ macOS that don't happen w/ Linux or FreeBSD. Move to common format.
new 45fed17 We don't need this anymore
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../source/cpp_uno/s5abi_macosx_x86-64/call.s | 120 ---------------------
.../source/cpp_uno/s5abi_macosx_x86-64/cpp2uno.cxx | 51 ++++++++-
.../source/cpp_uno/s5abi_macosx_x86-64/makefile.mk | 7 +-
3 files changed, 51 insertions(+), 127 deletions(-)
delete mode 100644 main/bridges/source/cpp_uno/s5abi_macosx_x86-64/call.s
[openoffice] 02/02: We don't need this anymore
Posted by ji...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jim pushed a commit to branch AOO42X
in repository https://gitbox.apache.org/repos/asf/openoffice.git
commit 45fed17af163bdddccc6ba55ed91b127abfcb129
Author: Jim Jagielski <ji...@gmail.com>
AuthorDate: Tue Dec 1 18:06:07 2020 -0500
We don't need this anymore
---
.../source/cpp_uno/s5abi_macosx_x86-64/call.s | 71 ----------------------
1 file changed, 71 deletions(-)
diff --git a/main/bridges/source/cpp_uno/s5abi_macosx_x86-64/call.s b/main/bridges/source/cpp_uno/s5abi_macosx_x86-64/call.s
deleted file mode 100644
index 8161d3e..0000000
--- a/main/bridges/source/cpp_uno/s5abi_macosx_x86-64/call.s
+++ /dev/null
@@ -1,71 +0,0 @@
-/**************************************************************
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- *************************************************************/
-
- .text
- .align 2
-.globl privateSnippetExecutor
-privateSnippetExecutor:
-.LCFI1:
- subq $160, %rsp
-.LCFI2:
- movq %r10, -152(%rbp) # Save (nVtableOffset << 32) + nFunctionIndex
-
- movq %rdi, -112(%rbp) # Save GP registers
- movq %rsi, -104(%rbp)
- movq %rdx, -96(%rbp)
- movq %rcx, -88(%rbp)
- movq %r8 , -80(%rbp)
- movq %r9 , -72(%rbp)
-
- movsd %xmm0, -64(%rbp) # Save FP registers
- movsd %xmm1, -56(%rbp)
- movsd %xmm2, -48(%rbp)
- movsd %xmm3, -40(%rbp)
- movsd %xmm4, -32(%rbp)
- movsd %xmm5, -24(%rbp)
- movsd %xmm6, -16(%rbp)
- movsd %xmm7, -8(%rbp)
-
- leaq -144(%rbp), %r9 # 6th param: sal_uInt64 * pRegisterReturn
- leaq 16(%rbp), %r8 # 5rd param: void ** ovrflw
- leaq -64(%rbp), %rcx # 4th param: void ** fpreg
- leaq -112(%rbp), %rdx # 3rd param: void ** gpreg
- movl -148(%rbp), %esi # 2nd param: sal_int32 nVtableOffset
- movl -152(%rbp), %edi # 1st param: sal_int32 nFunctionIndex
-
- call cpp_vtable_call
-
- cmp $10, %rax # typelib_TypeClass_FLOAT
- je .Lfloat
- cmp $11, %rax # typelib_TypeClass_DOUBLE
- je .Lfloat
-
- movq -144(%rbp), %rax # Return value (int case)
- movq -136(%rbp), %rdx # Return value (int case)
- movq -144(%rbp), %xmm0 # Return value (int case)
- movq -136(%rbp), %xmm1 # Return value (int case)
- jmp .Lfinish
-.Lfloat:
- movlpd -144(%rbp), %xmm0 # Return value (float/double case)
-
-.Lfinish:
- leave
- ret
[openoffice] 01/02: Move ASM back into file... weird linking issues
w/ macOS that don't happen w/ Linux or FreeBSD. Move to common format.
Posted by ji...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jim pushed a commit to branch AOO42X
in repository https://gitbox.apache.org/repos/asf/openoffice.git
commit 93a817699357bda69b1616eef20f587fad55d7a9
Author: Jim Jagielski <ji...@gmail.com>
AuthorDate: Tue Dec 1 18:05:12 2020 -0500
Move ASM back into file... weird linking issues w/ macOS that don't
happen w/ Linux or FreeBSD. Move to common format.
---
.../source/cpp_uno/s5abi_macosx_x86-64/call.s | 49 ---------------------
.../source/cpp_uno/s5abi_macosx_x86-64/cpp2uno.cxx | 51 +++++++++++++++++++++-
.../source/cpp_uno/s5abi_macosx_x86-64/makefile.mk | 7 +--
3 files changed, 51 insertions(+), 56 deletions(-)
diff --git a/main/bridges/source/cpp_uno/s5abi_macosx_x86-64/call.s b/main/bridges/source/cpp_uno/s5abi_macosx_x86-64/call.s
index 4801a94..8161d3e 100644
--- a/main/bridges/source/cpp_uno/s5abi_macosx_x86-64/call.s
+++ b/main/bridges/source/cpp_uno/s5abi_macosx_x86-64/call.s
@@ -22,12 +22,7 @@
.text
.align 2
.globl privateSnippetExecutor
- .type privateSnippetExecutor, @function
privateSnippetExecutor:
-.LFB3:
- pushq %rbp
-.LCFI0:
- movq %rsp, %rbp
.LCFI1:
subq $160, %rsp
.LCFI2:
@@ -74,47 +69,3 @@ privateSnippetExecutor:
.Lfinish:
leave
ret
-.LFE3:
- .size privateSnippetExecutor, .-privateSnippetExecutor
- # see http://refspecs.linuxfoundation.org/LSB_3.0.0/LSB-Core-generic/LSB-Core-generic/ehframechpt.html
- # for details of the .eh_frame, the "Common Information Entry" and "Frame Description Entry" formats
- # and http://mentorembedded.github.io/cxx-abi/exceptions.pdf for more info
- .section .eh_frame,"a",@progbits
-.Lframe1:
- .long .LECIE1-.LSCIE1
-.LSCIE1:
- .long 0x0
- .byte 0x1
- .string "zR"
- .uleb128 0x1
- .sleb128 -8
- .byte 0x10
- .uleb128 0x1
- .byte 0x1b
- .byte 0xc
- .uleb128 0x7
- .uleb128 0x8
- .byte 0x90
- .uleb128 0x1
- .align 8
-.LECIE1:
-.LSFDE1:
- .long .LEFDE1-.LASFDE1
-.LASFDE1:
- .long .LASFDE1-.Lframe1
- .long .LFB3-.
- .long .LFE3-.LFB3
- .uleb128 0x0
- .byte 0x4
- .long .LCFI0-.LFB3
- .byte 0xe
- .uleb128 0x10
- .byte 0x86
- .uleb128 0x2
- .byte 0x4
- .long .LCFI1-.LCFI0
- .byte 0xd
- .uleb128 0x6
- .align 8
-.LEFDE1:
- .section .note.GNU-stack,"",@progbits
diff --git a/main/bridges/source/cpp_uno/s5abi_macosx_x86-64/cpp2uno.cxx b/main/bridges/source/cpp_uno/s5abi_macosx_x86-64/cpp2uno.cxx
index 9c20b7a..92993cb 100644
--- a/main/bridges/source/cpp_uno/s5abi_macosx_x86-64/cpp2uno.cxx
+++ b/main/bridges/source/cpp_uno/s5abi_macosx_x86-64/cpp2uno.cxx
@@ -395,7 +395,56 @@ extern "C" typelib_TypeClass cpp_vtable_call(
}
//==================================================================================================
-extern "C" void privateSnippetExecutor( ... );
+extern "C" void privateSnippetExecutor( void )
+{
+ asm volatile
+ (
+ " subq $160, %rsp\n"
+ " movq %r10, -152(%rbp) # Save (nVtableOffset << 32) + nFunctionIndex\n"
+
+ " movq %rdi, -112(%rbp) # Save GP registers\n"
+ " movq %rsi, -104(%rbp)\n"
+ " movq %rdx, -96(%rbp)\n"
+ " movq %rcx, -88(%rbp)\n"
+ " movq %r8 , -80(%rbp)\n"
+ " movq %r9 , -72(%rbp)\n"
+
+ " movsd %xmm0, -64(%rbp) # Save FP registers\n"
+ " movsd %xmm1, -56(%rbp)\n"
+ " movsd %xmm2, -48(%rbp)\n"
+ " movsd %xmm3, -40(%rbp)\n"
+ " movsd %xmm4, -32(%rbp)\n"
+ " movsd %xmm5, -24(%rbp)\n"
+ " movsd %xmm6, -16(%rbp)\n"
+ " movsd %xmm7, -8(%rbp)\n"
+
+ " leaq -144(%rbp), %r9 # 6th param: sal_uInt64 * pRegisterReturn\n"
+ " leaq 16(%rbp), %r8 # 5rd param: void ** ovrflw\n"
+ " leaq -64(%rbp), %rcx # 4th param: void ** fpreg\n"
+ " leaq -112(%rbp), %rdx # 3rd param: void ** gpreg\n"
+ " movl -148(%rbp), %esi # 2nd param: sal_int32 nVtableOffset\n"
+ " movl -152(%rbp), %edi # 1st param: sal_int32 nFunctionIndex\n"
+
+ " call _cpp_vtable_call\n"
+
+ " cmp $10, %rax # typelib_TypeClass_FLOAT\n"
+ " je .Lfloat\n"
+ " cmp $11, %rax # typelib_TypeClass_DOUBLE\n"
+ " je .Lfloat\n"
+
+ " movq -144(%rbp), %rax # Return value (int case)\n"
+ " movq -136(%rbp), %rdx # Return value (int case)\n"
+ " movq -144(%rbp), %xmm0 # Return value (int case)\n"
+ " movq -136(%rbp), %xmm1 # Return value (int case)\n"
+ " jmp .Lfinish\n"
+
+ ".Lfloat:\n"
+ " movlpd -144(%rbp), %xmm0 # Return value (float/double case)\n"
+
+ ".Lfinish:\n"
+ " addq $160, %rsp\n"
+ );
+}
const int codeSnippetSize = 24;
diff --git a/main/bridges/source/cpp_uno/s5abi_macosx_x86-64/makefile.mk b/main/bridges/source/cpp_uno/s5abi_macosx_x86-64/makefile.mk
index 7f64991..f6fcc98 100644
--- a/main/bridges/source/cpp_uno/s5abi_macosx_x86-64/makefile.mk
+++ b/main/bridges/source/cpp_uno/s5abi_macosx_x86-64/makefile.mk
@@ -48,8 +48,7 @@ SLOFILES= \
$(SLO)$/abi.obj \
$(SLO)$/except.obj \
$(SLO)$/cpp2uno.obj \
- $(SLO)$/uno2cpp.obj \
- $(SLO)$/call.obj
+ $(SLO)$/uno2cpp.obj
SHL1TARGET= $(TARGET)
@@ -70,7 +69,3 @@ SHL1STDLIBS= \
# --- Targets ------------------------------------------------------
.INCLUDE : target.mk
-
-$(SLO)$/%.obj: %.s
- $(CC) -c -o $(SLO)$/$(@:b).o $<
- touch $@