Source-Changes-HG archive

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

[src-draft/trunk]: src/sys/arch/aarch64 Draft aarch64 zero_fpregs.



details:   https://anonhg.NetBSD.org/src-all/rev/81a487955535
branches:  trunk
changeset: 934742:81a487955535
user:      Taylor R Campbell <riastradh%NetBSD.org@localhost>
date:      Sun Jun 14 15:58:39 2020 +0000

description:
Draft aarch64 zero_fpregs.

Just a series of sad donkeys, with no memory references.

diffstat:

 sys/arch/aarch64/aarch64/cpuswitch.S |  40 ++++++++++++++++++++++++++++++++++++
 sys/arch/aarch64/include/machdep.h   |   1 +
 2 files changed, 41 insertions(+), 0 deletions(-)

diffs (58 lines):

diff -r 5f0c9efc2bac -r 81a487955535 sys/arch/aarch64/aarch64/cpuswitch.S
--- a/sys/arch/aarch64/aarch64/cpuswitch.S      Wed Jun 17 18:29:42 2020 +0000
+++ b/sys/arch/aarch64/aarch64/cpuswitch.S      Sun Jun 14 15:58:39 2020 +0000
@@ -538,3 +538,43 @@
        str     w9, [x0, #FPREG_FPSR]
        ret
 END(save_fpregs)
+
+ENTRY_NP(zero_fpregs)
+       eor     v0.16b, v0.16b, v0.16b
+       eor     v1.16b, v1.16b, v1.16b
+       eor     v2.16b, v2.16b, v2.16b
+       eor     v3.16b, v3.16b, v3.16b
+       eor     v4.16b, v4.16b, v4.16b
+       eor     v5.16b, v5.16b, v5.16b
+       eor     v6.16b, v6.16b, v6.16b
+       eor     v7.16b, v7.16b, v7.16b
+       eor     v8.16b, v8.16b, v8.16b
+       eor     v9.16b, v9.16b, v9.16b
+       eor     v10.16b, v10.16b, v10.16b
+       eor     v11.16b, v11.16b, v11.16b
+       eor     v12.16b, v12.16b, v12.16b
+       eor     v13.16b, v13.16b, v13.16b
+       eor     v14.16b, v14.16b, v14.16b
+       eor     v15.16b, v15.16b, v15.16b
+       eor     v16.16b, v16.16b, v16.16b
+       eor     v17.16b, v17.16b, v17.16b
+       eor     v18.16b, v18.16b, v18.16b
+       eor     v19.16b, v19.16b, v19.16b
+       eor     v20.16b, v20.16b, v20.16b
+       eor     v21.16b, v21.16b, v21.16b
+       eor     v22.16b, v22.16b, v22.16b
+       eor     v23.16b, v23.16b, v23.16b
+       eor     v24.16b, v24.16b, v24.16b
+       eor     v25.16b, v25.16b, v25.16b
+       eor     v26.16b, v26.16b, v26.16b
+       eor     v27.16b, v27.16b, v27.16b
+       eor     v28.16b, v28.16b, v28.16b
+       eor     v29.16b, v29.16b, v29.16b
+       eor     v30.16b, v30.16b, v30.16b
+       eor     v31.16b, v31.16b, v31.16b
+       eor     x8, x8, x8
+       eor     x9, x9, x9
+       msr     fpcr, x8
+       msr     fpsr, x9
+       ret
+END(zero_fpregs)
diff -r 5f0c9efc2bac -r 81a487955535 sys/arch/aarch64/include/machdep.h
--- a/sys/arch/aarch64/include/machdep.h        Wed Jun 17 18:29:42 2020 +0000
+++ b/sys/arch/aarch64/include/machdep.h        Sun Jun 14 15:58:39 2020 +0000
@@ -144,6 +144,7 @@
 struct fpreg;
 void load_fpregs(const struct fpreg *);
 void save_fpregs(struct fpreg *);
+void zero_fpregs(void);
 void fpu_kern_enter(void);
 void fpu_kern_leave(void);
 



Home | Main Index | Thread Index | Old Index