aws-lc-fips-sys 0.2.0

AWS-LC is a general-purpose cryptographic library maintained by the AWS Cryptography team for AWS and their customers. This is the FIPS validated version of AWS-LC.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0 OR ISC

// Builtin swap was added in GCC 4.8 https://gcc.gnu.org/gcc-4.8/changes.html. Recent versions of Clang pretend to be
// 4.2 but they do support the builtin swap functions.

#include <stdint.h>

int main() {
    uint16_t test16 = 0;
    test16 = __builtin_bswap16(test16);

    uint32_t test32 = 0;
    test32 = __builtin_bswap32(test32);

    uint64_t test64 = 0;
    test64 = __builtin_bswap64(test64);
}