[haiku-commits] haiku: hrev53013 - src/system/libroot/os/arch/x86_64

  • From: waddlesplash <waddlesplash@xxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Wed, 27 Mar 2019 15:12:51 -0400 (EDT)

hrev53013 adds 1 changeset to branch 'master'
old head: 569791be528cbda474e81783a870cb8cff76231d
new head: ebc14c992195ae0d2a23725e2f7e1e3514469b4c
overview: 
https://git.haiku-os.org/haiku/log/?qt=range&q=ebc14c992195+%5E569791be528c

----------------------------------------------------------------------------

ebc14c992195: libroot: Restore the old __swap functions for x86_64.
  
  They are needed in order to not break applications compiled against
  them. Fixes the boot on x86_64 after PulkoMandy's commit.

                              [ Augustin Cavalier <waddlesplash@xxxxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev53013
Commit:      ebc14c992195ae0d2a23725e2f7e1e3514469b4c
URL:         https://git.haiku-os.org/haiku/commit/?id=ebc14c992195
Author:      Augustin Cavalier <waddlesplash@xxxxxxxxx>
Date:        Wed Mar 27 19:11:30 2019 UTC

----------------------------------------------------------------------------

1 file changed, 22 insertions(+)
src/system/libroot/os/arch/x86_64/byteorder.S | 22 ++++++++++++++++++++++

----------------------------------------------------------------------------

diff --git a/src/system/libroot/os/arch/x86_64/byteorder.S 
b/src/system/libroot/os/arch/x86_64/byteorder.S
index 27066a6adf..9b346809fa 100644
--- a/src/system/libroot/os/arch/x86_64/byteorder.S
+++ b/src/system/libroot/os/arch/x86_64/byteorder.S
@@ -7,6 +7,28 @@
 #include <asm_defs.h>
 
 
+/* uint16 __swap_int16(uint16 value) */
+FUNCTION(__swap_int16):
+       movl    %edi, %eax
+       bswap   %eax
+       shr             $16, %eax
+       ret
+FUNCTION_END(__swap_int16)
+
+/* uint32 __swap_int32(uint32 value) */
+FUNCTION(__swap_int32):
+       movl    %edi, %eax
+       bswap   %eax
+       ret
+FUNCTION_END(__swap_int32)
+
+/* uint64 __swap_int64(uint64 value) */
+FUNCTION(__swap_int64):
+       movq    %rdi, %rax
+       bswap   %rax
+       ret
+FUNCTION_END(__swap_int64)
+
 /* float __swap_float(float value) */
 FUNCTION(__swap_float):
        sub             $8, %rsp


Other related posts:

  • » [haiku-commits] haiku: hrev53013 - src/system/libroot/os/arch/x86_64 - waddlesplash