| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: byte_swap_8.S,v 1.1 2014/08/10 05:47:35 matt Exp $ */ | | 1 | /* $NetBSD: byte_swap_8.S,v 1.2 2019/10/12 09:22:36 maya Exp $ */ |
2 | | | 2 | |
3 | /*- | | 3 | /*- |
4 | * Copyright (c) 2014 The NetBSD Foundation, Inc. | | 4 | * Copyright (c) 2014 The NetBSD Foundation, Inc. |
5 | * All rights reserved. | | 5 | * All rights reserved. |
6 | * | | 6 | * |
7 | * This code is derived from software contributed to The NetBSD Foundation | | 7 | * This code is derived from software contributed to The NetBSD Foundation |
8 | * by Matt Thomas of 3am Software Foundry. | | 8 | * by Matt Thomas of 3am Software Foundry. |
9 | * | | 9 | * |
10 | * Redistribution and use in source and binary forms, with or without | | 10 | * Redistribution and use in source and binary forms, with or without |
11 | * modification, are permitted provided that the following conditions | | 11 | * modification, are permitted provided that the following conditions |
12 | * are met: | | 12 | * are met: |
13 | * 1. Redistributions of source code must retain the above copyright | | 13 | * 1. Redistributions of source code must retain the above copyright |
14 | * notice, this list of conditions and the following disclaimer. | | 14 | * notice, this list of conditions and the following disclaimer. |
| @@ -31,17 +31,13 @@ | | | @@ -31,17 +31,13 @@ |
31 | | | 31 | |
32 | #include <machine/asm.h> | | 32 | #include <machine/asm.h> |
33 | | | 33 | |
34 | #if defined(_KERNEL) || defined(_STANDALONE) | | 34 | #if defined(_KERNEL) || defined(_STANDALONE) |
35 | #define FUNC _C_LABEL(bswap64) | | 35 | #define FUNC _C_LABEL(bswap64) |
36 | #else | | 36 | #else |
37 | #define FUNC _C_LABEL(__bswap64) | | 37 | #define FUNC _C_LABEL(__bswap64) |
38 | #endif | | 38 | #endif |
39 | | | 39 | |
40 | ENTRY(FUNC) | | 40 | ENTRY(FUNC) |
41 | rev x0, x0 | | 41 | rev x0, x0 |
42 | ret | | 42 | ret |
43 | END(FUNC) | | 43 | END(FUNC) |
44 | #if BYTE_ORDER == LITTLE_ENDIAN | | | |
45 | STRONG_ALIAS(_C_LABEL(ntohll), FUNC) | | | |
46 | STRONG_ALIAS(_C_LABEL(htonll), FUNC) | | | |
47 | #endif | | | |