]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crc32c: mach-o 64 follows the same calling convention as elf64 does
authorKefu Chai <kchai@redhat.com>
Wed, 13 Sep 2017 07:28:08 +0000 (15:28 +0800)
committerKefu Chai <kchai@redhat.com>
Sat, 16 Sep 2017 02:47:02 +0000 (10:47 +0800)
so reuse the register-parameter/variable mappings

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/common/crc32c_intel_fast_asm.s
src/common/crc32c_intel_fast_zero_asm.s

index 5c3cd3b197e5d92a76f4c378431e4f1d629ebbcd..c9fc1b9d5c161baed6c4b86d388b2202b929d733 100644 (file)
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
+%ifidn __OUTPUT_FORMAT__, elf64
+%define ABI_IS_AMD64
+%elifidn __OUTPUT_FORMAT__, macho64
+%define ABI_IS_AMD64
+%endif
+
 ;;; ISCSI CRC 32 Implementation with crc32 Instruction
 
 ;;; unsigned int crc32_iscsi_00(unsigned char * buffer, int len, unsigned int crc_init);
 global  crc32_iscsi_00:function
 crc32_iscsi_00:
 
-%ifidn __OUTPUT_FORMAT__, elf64
+%ifdef ABI_IS_AMD64
 %define bufp            rdi
 %define bufp_dw         edi
 %define bufp_w          di
index ec1b78ffcb27ddf6cd3d0b3bd88466e17189f38f..e648396392714aa0f2440f6b776eb22963998fc6 100644 (file)
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
+%ifidn __OUTPUT_FORMAT__, elf64
+%define ABI_IS_AMD64
+%elifidn __OUTPUT_FORMAT__, macho64
+%define ABI_IS_AMD64
+%endif
+
 ;;; ISCSI CRC 32 Implementation with crc32 Instruction
 
 ;;; unsigned int crc32_iscsi_00(unsigned char * buffer, int len, unsigned int crc_init);
 global  crc32_iscsi_zero_00:function
 crc32_iscsi_zero_00:
 
-%ifidn __OUTPUT_FORMAT__, elf64
+%ifdef ABI_IS_AMD64
 %define bufp            rdi
 %define bufp_dw         edi
 %define bufp_w          di