Module Name: src Committed By: tsutsui Date: Sat Feb 20 18:04:20 UTC 2021
Modified Files: src/sys/arch/m68k/m68k: reenter_syscall.s Log Message: Replace magic numbers with proper macros prepared in assym.h. No binary changes. Note this is a preparation for a possible fix of PR port-m68k/55990. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/arch/m68k/m68k/reenter_syscall.s 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/m68k/m68k/reenter_syscall.s diff -u src/sys/arch/m68k/m68k/reenter_syscall.s:1.4 src/sys/arch/m68k/m68k/reenter_syscall.s:1.5 --- src/sys/arch/m68k/m68k/reenter_syscall.s:1.4 Sat Sep 7 19:06:29 2013 +++ src/sys/arch/m68k/m68k/reenter_syscall.s Sat Feb 20 18:04:20 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: reenter_syscall.s,v 1.4 2013/09/07 19:06:29 chs Exp $ */ +/* $NetBSD: reenter_syscall.s,v 1.5 2021/02/20 18:04:20 tsutsui Exp $ */ /* * Written by ITOH Yasufumi. @@ -6,6 +6,7 @@ */ #include <m68k/asm.h> +#include "assym.h" /* * void reenter_syscall(struct frame *fp, int stkadj) @@ -38,17 +39,17 @@ ENTRY_NOPROFILE(reenter_syscall) .Lcpfr: movel (%a0)+,(%a1)+ dbra %d0,.Lcpfr - movew %d1,%sp@(16*4+2) | set stack adjust count + movew %d1,%sp@(FR_ADJ) | set stack adjust count movel (%sp),-(%sp) | push syscall no (original d0 value) jbsr _C_LABEL(syscall) | re-enter syscall() addql #4,%sp | pop syscall no #ifdef DEBUG - tstw %sp@(16*4+2) | stack adjust must be zero + tstw %sp@(FR_ADJ) | stack adjust must be zero jeq .Ladjzero PANIC("reenter_syscall") .Ladjzero: #endif - moveal %sp@(15*4),%a0 | grab and restore + moveal %sp@(FR_SP),%a0 | grab and restore movel %a0,%usp | user SP moveml (%sp)+,#0x7FFF | restore user registers addql #8,%sp | pop SP and stack adjust