Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/aarch64/include Use __uint128_t conditionally in aa...



details:   https://anonhg.NetBSD.org/src/rev/7fc5a93df4b4
branches:  trunk
changeset: 324750:7fc5a93df4b4
user:      kamil <kamil%NetBSD.org@localhost>
date:      Tue Jul 17 16:21:43 2018 +0000

description:
Use __uint128_t conditionally in aarch64 reg.h

Check whether __uint128_t is available checking __SIZEOF_INT128__ in
preprocessor.
Move __aligned attribute to the whole structure.

No functional change for current NetBSD/aarch64 users of GCC and Clang.

This change allows to use the aarch64 target with rumpkernel on Linux
aarch64 hosts, in a toolchain configuration with 128-bit variables.

OK from <martin> and <christos>

diffstat:

 sys/arch/aarch64/include/reg.h |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r 6a148bdd83d6 -r 7fc5a93df4b4 sys/arch/aarch64/include/reg.h
--- a/sys/arch/aarch64/include/reg.h    Tue Jul 17 15:03:48 2018 +0000
+++ b/sys/arch/aarch64/include/reg.h    Tue Jul 17 16:21:43 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: reg.h,v 1.2 2018/04/01 04:35:03 ryo Exp $ */
+/* $NetBSD: reg.h,v 1.3 2018/07/17 16:21:43 kamil Exp $ */
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -44,14 +44,16 @@
 
 union fpelem {
        uint64_t u64[2];
-       __uint128_t u128[1] __aligned(16);
+#ifdef __SIZEOF_INT128__
+       __uint128_t u128[1];
+#endif
 };
 
 struct fpreg {
        union fpelem fp_reg[32];
        uint32_t fpcr;
        uint32_t fpsr;
-};
+} __aligned(16);
 
 #elif defined(__arm__)
 



Home | Main Index | Thread Index | Old Index