diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0ffff867376..6497c027be4 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -56,15 +56,15 @@ repos: description: ensures that links to vcs websites are permalinks - id: end-of-file-fixer description: makes sure files end in a newline and only a newline - files: (m|M)akefile$|\.(asm|asp|bas|bat|c|cl|cmd|common|component|cpp|cxx|dxp|el|h|hrc|hxx|idl|in|ini|java|js|lst|m|m4|map|md|mk|mm|mod|pas|php|pl|pm|pmk|py|rc|rdf|rng|sdi|sh|src|ulf|vbs|xba|xcs|xcu|xdl|xhp|xlb|xmi|xml|xsd|xslt?|ya?ml)$|^ext_libraries/.*$|^test/.*$ + files: (m|M)akefile$|\.(asm|asp|bas|bat|c|cl|cmd|common|component|cpp|cxx|dxp|el|h|hrc|hxx|idl|in|ini|java|js|lst|m|m4|map|md|mk|mm|mod|pas|php|pl|pm|pmk|py|rc|rdf|rng|s|sdi|sh|src|ulf|vbs|xba|xcs|xcu|xdl|xhp|xlb|xmi|xml|xsd|xslt?|ya?ml)$|^ext_libraries/.*$|^test/.*$ - id: fix-byte-order-marker description: removes UTF-8 byte order marker - id: mixed-line-ending description: replaces or checks mixed line ending - files: \.(asm|asp|bas|c|cl|cmd|common|component|cpp|cxx|dxp|el|h|hrc|hxx|idl|in|ini|java|js|lst|m|m4|map|md|mk|mm|mod|pas|php|pl|pm|pmk|py|rc|rdf|rng|sdi|sh|src|ulf|vbs|xba|xcs|xcu|xdl|xhp|xlb|xmi|xsd|xslt?|ya?ml)$|^main/accessibility/.*$|^main/afms/.*$|^main/animations/.*$|^main/apache-commons/.*$|^test/testgui/.*$ + files: \.(asm|asp|bas|c|cl|cmd|common|component|cpp|cxx|dxp|el|h|hrc|hxx|idl|in|ini|java|js|lst|m|m4|map|md|mk|mm|mod|pas|php|pl|pm|pmk|py|rc|rdf|rng|s|sdi|sh|src|ulf|vbs|xba|xcs|xcu|xdl|xhp|xlb|xmi|xsd|xslt?|ya?ml)$|^main/accessibility/.*$|^main/afms/.*$|^main/animations/.*$|^main/apache-commons/.*$|^test/testgui/.*$ - id: trailing-whitespace description: trims trailing whitespace - files: (m|M)akefile$|\.(asm|asp|bas|bat|c|cl|cmd|common|component|cpp|cxx|dxp|el|h|hrc|hxx|idl|in|ini|java|js|lst|m|m4|map|md|mk|mm|mod|pas|php|pl|pm|pmk|py|rc|rdf|rng|sdi|sh|src|ulf|vbs|xba|xcs|xcu|xdl|xhp|xlb|xmi|xml|xsd|ya?ml)$ + files: (m|M)akefile$|\.(asm|asp|bas|bat|c|cl|cmd|common|component|cpp|cxx|dxp|el|h|hrc|hxx|idl|in|ini|java|js|lst|m|m4|map|md|mk|mm|mod|pas|php|pl|pm|pmk|py|rc|rdf|rng|s|sdi|sh|src|ulf|vbs|xba|xcs|xcu|xdl|xhp|xlb|xmi|xml|xsd|ya?ml)$ args: [--markdown-linebreak-ext=md] - repo: https://github.com/codespell-project/codespell rev: v2.4.1 diff --git a/main/basic/source/runtime/wnt-mingw.s b/main/basic/source/runtime/wnt-mingw.s index 7c32b87239d..36311dfa848 100644 --- a/main/basic/source/runtime/wnt-mingw.s +++ b/main/basic/source/runtime/wnt-mingw.s @@ -1,6 +1,6 @@ #************************************************************** -# -# +# +# # 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 @@ -8,16 +8,16 @@ # 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. -# +# #************************************************************** .intel_syntax diff --git a/main/bridges/source/cpp_uno/cc50_solaris_intel/call.s b/main/bridges/source/cpp_uno/cc50_solaris_intel/call.s index cb9c0e6e72d..0432809036d 100644 --- a/main/bridges/source/cpp_uno/cc50_solaris_intel/call.s +++ b/main/bridges/source/cpp_uno/cc50_solaris_intel/call.s @@ -1,5 +1,5 @@ //************************************************************** -/ * +/ * / * 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 @@ -7,16 +7,16 @@ / * 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. -/ * +/ * / *************************************************************/ .align 4 @@ -177,7 +177,7 @@ callVirtualMethod: je .handleByte cmp $3, %ecx je .handleByte / typelib_TypeClass_BYTE - + / half word types cmp $4, %ecx / typelib_TypeClass_SHORT je .handleShort @@ -255,7 +255,7 @@ callVirtualMethodExceptionHandler: movl -20(%ebp), %ebx call __1cG__CrunMex_rethrow_q6F_v_@PLT ret - + .type callVirtualMethodExceptionHandler, @function .size callVirtualMethodExceptionHandler, .-callVirtualMethodExceptionHandler diff --git a/main/bridges/source/cpp_uno/cc50_solaris_sparc/call.s b/main/bridges/source/cpp_uno/cc50_solaris_sparc/call.s index 699a528c193..421906dcb87 100644 --- a/main/bridges/source/cpp_uno/cc50_solaris_sparc/call.s +++ b/main/bridges/source/cpp_uno/cc50_solaris_sparc/call.s @@ -1,5 +1,5 @@ !\************************************************************** -! * +! * ! * 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 @@ -7,16 +7,16 @@ ! * 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. -! * +! * ! *************************************************************/ .global privateSnippetExecutor @@ -53,7 +53,7 @@ privateSnippetExecutor: .size privateSnippetExecutor,(.-privateSnippetExecutor) .align 8 - + .global callVirtualMethod .type callVirtualMethod,2 callVirtualMethod: @@ -72,10 +72,10 @@ callVirtualMethod: ! prepare source location add %i4, 24, %l4 - + ! prepare real stack add %sp, 92, %l3 - + .copyLong: ld [%l4+0], %l0 st %l0, [%l3] diff --git a/main/bridges/source/cpp_uno/cc5_solaris_sparc64/callvirtualmethod.s b/main/bridges/source/cpp_uno/cc5_solaris_sparc64/callvirtualmethod.s index 03135d9eff7..8d0d4e399ec 100644 --- a/main/bridges/source/cpp_uno/cc5_solaris_sparc64/callvirtualmethod.s +++ b/main/bridges/source/cpp_uno/cc5_solaris_sparc64/callvirtualmethod.s @@ -1,5 +1,5 @@ !/************************************************************** -! * +! * ! * 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 @@ -7,16 +7,16 @@ ! * 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. -! * +! * ! *************************************************************/ diff --git a/main/bridges/source/cpp_uno/cc5_solaris_sparc64/fp.s b/main/bridges/source/cpp_uno/cc5_solaris_sparc64/fp.s index d56667313f6..b8a4c6d427f 100644 --- a/main/bridges/source/cpp_uno/cc5_solaris_sparc64/fp.s +++ b/main/bridges/source/cpp_uno/cc5_solaris_sparc64/fp.s @@ -1,5 +1,5 @@ !/************************************************************** -! * +! * ! * 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 @@ -7,16 +7,16 @@ ! * 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. -! * +! * ! *************************************************************/ diff --git a/main/bridges/source/cpp_uno/cc5_solaris_sparc64/vtableslotcall.s b/main/bridges/source/cpp_uno/cc5_solaris_sparc64/vtableslotcall.s index 6ab262254a6..fb5a1de2b5b 100644 --- a/main/bridges/source/cpp_uno/cc5_solaris_sparc64/vtableslotcall.s +++ b/main/bridges/source/cpp_uno/cc5_solaris_sparc64/vtableslotcall.s @@ -1,5 +1,5 @@ !/************************************************************** -! * +! * ! * 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 @@ -7,16 +7,16 @@ ! * 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. -! * +! * ! *************************************************************/ diff --git a/main/bridges/source/cpp_uno/gcc3_freebsd_intel/call.s b/main/bridges/source/cpp_uno/gcc3_freebsd_intel/call.s index ffd773c4f8e..6ffe44af67c 100644 --- a/main/bridges/source/cpp_uno/gcc3_freebsd_intel/call.s +++ b/main/bridges/source/cpp_uno/gcc3_freebsd_intel/call.s @@ -1,5 +1,5 @@ /************************************************************** - * + * * 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 @@ -7,16 +7,16 @@ * 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 diff --git a/main/bridges/source/cpp_uno/gcc3_freebsd_powerpc64/call.s b/main/bridges/source/cpp_uno/gcc3_freebsd_powerpc64/call.s index 48d12c5235e..3803f5e8885 100644 --- a/main/bridges/source/cpp_uno/gcc3_freebsd_powerpc64/call.s +++ b/main/bridges/source/cpp_uno/gcc3_freebsd_powerpc64/call.s @@ -1,5 +1,5 @@ /************************************************************** - * + * * 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 @@ -7,16 +7,16 @@ * 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. - * + * *************************************************************/ @@ -144,7 +144,7 @@ callVirtualMethod: lfd 11, 80(9) lfd 12, 88(9) lfd 13, 96(9) - + # 0 "" 2 #NO_APP ld 9,104(31) @@ -183,7 +183,7 @@ callVirtualMethod: mr 3, 3 mr 4, 4 fmr 0, 1 - + # 0 "" 2 #NO_APP stfd 0,152(31) @@ -256,19 +256,19 @@ privateSnippetExecutor: addi 9,31,144 #APP # 173 "uno_ppc64_asm.cc" 1 - stfd 1, 0(9) -stfd 2, 8(9) -stfd 3, 16(9) -stfd 4, 24(9) -stfd 5, 32(9) -stfd 6, 40(9) -stfd 7, 48(9) -stfd 8, 56(9) -stfd 9, 64(9) -stfd 10, 72(9) -stfd 11, 80(9) -stfd 12, 88(9) -stfd 13, 96(9) + stfd 1, 0(9) +stfd 2, 8(9) +stfd 3, 16(9) +stfd 4, 24(9) +stfd 5, 32(9) +stfd 6, 40(9) +stfd 7, 48(9) +stfd 8, 56(9) +stfd 9, 64(9) +stfd 10, 72(9) +stfd 11, 80(9) +stfd 12, 88(9) +stfd 13, 96(9) # 0 "" 2 #NO_APP @@ -322,7 +322,7 @@ stfd 13, 96(9) #APP # 209 "uno_ppc64_asm.cc" 1 lbz 3,64(31) - + # 0 "" 2 #NO_APP b .L17 @@ -330,7 +330,7 @@ stfd 13, 96(9) #APP # 214 "uno_ppc64_asm.cc" 1 lhz 3,64(31) - + # 0 "" 2 #NO_APP b .L17 @@ -338,7 +338,7 @@ stfd 13, 96(9) #APP # 218 "uno_ppc64_asm.cc" 1 lha 3,64(31) - + # 0 "" 2 #NO_APP b .L17 @@ -346,7 +346,7 @@ stfd 13, 96(9) #APP # 223 "uno_ppc64_asm.cc" 1 lwz 3,64(31) - + # 0 "" 2 #NO_APP b .L17 @@ -354,7 +354,7 @@ stfd 13, 96(9) #APP # 227 "uno_ppc64_asm.cc" 1 lwa 3,64(31) - + # 0 "" 2 #NO_APP b .L17 @@ -363,7 +363,7 @@ stfd 13, 96(9) #APP # 231 "uno_ppc64_asm.cc" 1 lfs 1,0(9) - + # 0 "" 2 #NO_APP b .L17 @@ -372,7 +372,7 @@ stfd 13, 96(9) #APP # 235 "uno_ppc64_asm.cc" 1 lfd 1,0(9) - + # 0 "" 2 #NO_APP b .L17 @@ -380,11 +380,11 @@ stfd 13, 96(9) #APP # 239 "uno_ppc64_asm.cc" 1 ld 3,64(31) - + # 0 "" 2 # 241 "uno_ppc64_asm.cc" 1 ld 4,72(31) - + # 0 "" 2 #NO_APP b .L17 diff --git a/main/bridges/source/cpp_uno/gcc3_freebsd_x86-64/call.s b/main/bridges/source/cpp_uno/gcc3_freebsd_x86-64/call.s index 4801a94029e..fc67439c3fa 100644 --- a/main/bridges/source/cpp_uno/gcc3_freebsd_x86-64/call.s +++ b/main/bridges/source/cpp_uno/gcc3_freebsd_x86-64/call.s @@ -1,5 +1,5 @@ /************************************************************** - * + * * 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 @@ -7,16 +7,16 @@ * 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 @@ -39,7 +39,7 @@ privateSnippetExecutor: 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) @@ -55,7 +55,7 @@ privateSnippetExecutor: 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 diff --git a/main/bridges/source/cpp_uno/gcc3_linux_ia64/call.s b/main/bridges/source/cpp_uno/gcc3_linux_ia64/call.s index 7dcf1acde3d..a51e6693926 100644 --- a/main/bridges/source/cpp_uno/gcc3_linux_ia64/call.s +++ b/main/bridges/source/cpp_uno/gcc3_linux_ia64/call.s @@ -1,5 +1,5 @@ /************************************************************** - * + * * 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 @@ -7,16 +7,16 @@ * 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. - * + * *************************************************************/ /* ia64 support code for OpenOffice C++/UNO bridging diff --git a/main/bridges/source/cpp_uno/gcc3_linux_intel/call.s b/main/bridges/source/cpp_uno/gcc3_linux_intel/call.s index ffd773c4f8e..6ffe44af67c 100644 --- a/main/bridges/source/cpp_uno/gcc3_linux_intel/call.s +++ b/main/bridges/source/cpp_uno/gcc3_linux_intel/call.s @@ -1,5 +1,5 @@ /************************************************************** - * + * * 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 @@ -7,16 +7,16 @@ * 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 diff --git a/main/bridges/source/cpp_uno/gcc3_linux_sparc/call.s b/main/bridges/source/cpp_uno/gcc3_linux_sparc/call.s index f203035b64a..7678cc29c31 100644 --- a/main/bridges/source/cpp_uno/gcc3_linux_sparc/call.s +++ b/main/bridges/source/cpp_uno/gcc3_linux_sparc/call.s @@ -1,5 +1,5 @@ /************************************************************** - * + * * 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 @@ -7,16 +7,16 @@ * 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. - * + * *************************************************************/ .global doFlushCode diff --git a/main/bridges/source/cpp_uno/gcc3_linux_x86-64/call.s b/main/bridges/source/cpp_uno/gcc3_linux_x86-64/call.s index 4801a94029e..fc67439c3fa 100644 --- a/main/bridges/source/cpp_uno/gcc3_linux_x86-64/call.s +++ b/main/bridges/source/cpp_uno/gcc3_linux_x86-64/call.s @@ -1,5 +1,5 @@ /************************************************************** - * + * * 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 @@ -7,16 +7,16 @@ * 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 @@ -39,7 +39,7 @@ privateSnippetExecutor: 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) @@ -55,7 +55,7 @@ privateSnippetExecutor: 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 diff --git a/main/bridges/source/cpp_uno/mingw_intel/call.s b/main/bridges/source/cpp_uno/mingw_intel/call.s index 091e4c3f7c7..06a00130478 100644 --- a/main/bridges/source/cpp_uno/mingw_intel/call.s +++ b/main/bridges/source/cpp_uno/mingw_intel/call.s @@ -1,5 +1,5 @@ /************************************************************** - * + * * 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 @@ -7,16 +7,16 @@ * 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 diff --git a/main/sal/osl/unx/asm/interlck_sparc.s b/main/sal/osl/unx/asm/interlck_sparc.s index edf9884444d..698df772c41 100644 --- a/main/sal/osl/unx/asm/interlck_sparc.s +++ b/main/sal/osl/unx/asm/interlck_sparc.s @@ -1,5 +1,5 @@ /************************************************************** - * + * * 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 @@ -7,16 +7,16 @@ * 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. - * + * *************************************************************/ @@ -26,22 +26,22 @@ * Implements osl_[increment|decrement]InterlockedCount in two ways: * sparcv8 architecture: use the "swap" instruction * sparcv9/sparcv8plus architecture: use the "cas" instruction - * + * * 32 bit mode with v8 and v8plus support: * Initialize once with osl_InterlockedCountSetV9(int bv9) if you want to * use the "cas" instruction, which is faster (no spinlock needed) * Default is to use the "swap" instruction, which works on all supported * SPARC cpu's - * + * * osl_InterlockedCountSetV9(int bv9) * bv9 = 0 use sparcv8 "swap" (spinlock) * bv9 = 1 use sparcv9/sparcv8plus "cas" (no spinlock) * * 32 bit mode without v8 support (implies v8plus) or 64 bit mode: - * No need (nor the possibility) to call osl_InterlockedCountSetV9(), + * No need (nor the possibility) to call osl_InterlockedCountSetV9(), * sparcv9 mode is implied. Assemble with -xarch=v8plus (32 bit) or * -xarch=v9 (64 bit). - * + * */ #if !defined(__sparcv8plus) && !defined(__sparcv9) && !defined(__sparc_v9__) @@ -158,7 +158,7 @@ osl_InterlockedCountSetV9: .type osl_InterlockedCountSetV9,#function .size osl_InterlockedCountSetV9,.-osl_InterlockedCountSetV9 - + .section ".text" .local osl_incrementInterlockedCountV8 @@ -167,7 +167,7 @@ osl_InterlockedCountSetV9: ! Implements osl_[increment|decrement]InterlockedCount with sparcv8 "swap" instruction. ! Uses -4096 as lock value for spinlock to allow for small negative counts. -osl_incrementInterlockedCountV8: +osl_incrementInterlockedCountV8: 1: ld [%o0], %o1 cmp %o1, -4096 ! test spinlock @@ -189,7 +189,7 @@ osl_incrementInterlockedCountV8: .local osl_decrementInterlockedCountV8 .align 4 -osl_decrementInterlockedCountV8: +osl_decrementInterlockedCountV8: 1: ld [%o0], %o1 cmp %o1, -4096 ! test spinlock @@ -217,15 +217,15 @@ osl_decrementInterlockedCountV8: #endif .align 8 -! Implements osl_[increment|decrement]InterlockedCount with sparcv9(sparcv8plus) "cas" +! Implements osl_[increment|decrement]InterlockedCount with sparcv9(sparcv8plus) "cas" ! instruction. -osl_incrementInterlockedCountV9: +osl_incrementInterlockedCountV9: 1: ld [%o0], %o1 add %o1, 1, %o2 ! allow linux to build for v8 - .word 0xD5E21009 + .word 0xD5E21009 ! cas [%o0], %o1, %o2 cmp %o1, %o2 bne 1b @@ -246,12 +246,12 @@ osl_incrementInterlockedCountV9: #endif .align 8 -osl_decrementInterlockedCountV9: +osl_decrementInterlockedCountV9: 1: ld [%o0], %o1 sub %o1, 1, %o2 ! allow linux to build for v8 - .word 0xD5E21009 + .word 0xD5E21009 ! cas [%o0], %o1, %o2 cmp %o1, %o2 bne 1b diff --git a/main/sal/osl/unx/asm/interlck_x86.s b/main/sal/osl/unx/asm/interlck_x86.s index c779cfa8066..d78d06e74aa 100644 --- a/main/sal/osl/unx/asm/interlck_x86.s +++ b/main/sal/osl/unx/asm/interlck_x86.s @@ -1,5 +1,5 @@ /************************************************************** - * + * * 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 @@ -7,16 +7,16 @@ * 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. - * + * *************************************************************/ @@ -49,8 +49,8 @@ osl_incrementInterlockedCount: pop %ebx mov %ebp,%esp pop %ebp - ret - + ret + .type osl_incrementInterlockedCount,@function .size osl_incrementInterlockedCount,.-osl_incrementInterlockedCount @@ -73,16 +73,15 @@ osl_decrementInterlockedCount: je 2f xadd %eax,(%ecx) jmp 3f -2: - lock +2: + lock xadd %eax,(%ecx) 3: dec %eax pop %ebx mov %ebp,%esp pop %ebp - ret - + ret + .type osl_decrementInterlockedCount,@function .size osl_decrementInterlockedCount,.-osl_decrementInterlockedCount -