Module Name:    src
Committed By:   kamil
Date:           Tue Jul 17 16:21:43 UTC 2018

Modified Files:
        src/sys/arch/aarch64/include: reg.h

Log Message:
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>


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/aarch64/include/reg.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/aarch64/include/reg.h
diff -u src/sys/arch/aarch64/include/reg.h:1.2 src/sys/arch/aarch64/include/reg.h:1.3
--- src/sys/arch/aarch64/include/reg.h:1.2	Sun Apr  1 04:35:03 2018
+++ src/sys/arch/aarch64/include/reg.h	Tue Jul 17 16:21:43 2018
@@ -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 @@ struct reg {
 
 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__)
 

Reply via email to