tech-kern archive

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

Re: aarch64 gcc kernel compilation



>>>> Can we drop it? The __uint128_t type is not used anywhere else in
>>>> aarch64 subdirs.

fortunately, we don't use member of fpreg, use just only as container.
Is this patch enough?

cvs -q diff -aup pcb.h reg.h
Index: pcb.h
===================================================================
RCS file: /src/cvs/cvsroot-netbsd/src/sys/arch/aarch64/include/pcb.h,v
retrieving revision 1.1
diff -a -u -p -r1.1 pcb.h
--- pcb.h	10 Aug 2014 05:47:38 -0000	1.1
+++ pcb.h	17 Jul 2018 04:59:37 -0000
@@ -45,6 +45,10 @@ struct md_coredump {
 	struct fpreg fpreg;
 };
 
+/* fpreg should be aligned 16 */
+CTASSERT((offsetof(struct pcb, pcb_fpregs) & 15) == 0);
+CTASSERT((offsetof(struct md_coredump, fpreg) & 15) == 0);
+
 #elif defined(__arm__)
 
 #include <arm/pcb.h>
Index: reg.h
===================================================================
RCS file: /src/cvs/cvsroot-netbsd/src/sys/arch/aarch64/include/reg.h,v
retrieving revision 1.2
diff -a -u -p -r1.2 reg.h
--- reg.h	1 Apr 2018 04:35:03 -0000	1.2
+++ reg.h	17 Jul 2018 04:58:07 -0000
@@ -44,14 +44,14 @@ struct reg {
 
 union fpelem {
 	uint64_t u64[2];
-	__uint128_t u128[1] __aligned(16);
+	/* __uint128_t u128[1] __aligned(16); */
 };
 
 struct fpreg {
 	union fpelem fp_reg[32];
 	uint32_t fpcr;
 	uint32_t fpsr;
-};
+} __aligned(16);
 
 #elif defined(__arm__)
 

-- 
ryo shimizu


Home | Main Index | Thread Index | Old Index