Module Name: src
Committed By: uwe
Date: Mon Aug 3 03:34:11 UTC 2020
Modified Files:
src/sys/arch/sh3/sh3: locore_subr.S
Log Message:
_cpu_exception_suspend, _cpu_exception_resume - cosmetics
Use PSL_BL instead of magic hex in comments. Use spaces between
operands. Same object code is generated.
To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 src/sys/arch/sh3/sh3/locore_subr.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/sh3/sh3/locore_subr.S
diff -u src/sys/arch/sh3/sh3/locore_subr.S:1.58 src/sys/arch/sh3/sh3/locore_subr.S:1.59
--- src/sys/arch/sh3/sh3/locore_subr.S:1.58 Wed Jan 8 20:59:19 2020
+++ src/sys/arch/sh3/sh3/locore_subr.S Mon Aug 3 03:34:11 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: locore_subr.S,v 1.58 2020/01/08 20:59:19 skrll Exp $ */
+/* $NetBSD: locore_subr.S,v 1.59 2020/08/03 03:34:11 uwe Exp $ */
/*-
* Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -40,7 +40,7 @@
#include <sh3/mmu_sh3.h>
#include <sh3/mmu_sh4.h>
-__KERNEL_RCSID(0, "$NetBSD: locore_subr.S,v 1.58 2020/01/08 20:59:19 skrll Exp $")
+__KERNEL_RCSID(0, "$NetBSD: locore_subr.S,v 1.59 2020/08/03 03:34:11 uwe Exp $")
/*
@@ -298,15 +298,15 @@ NENTRY(_cpu_intr_resume)
* if exception occur, jump to 0xa0000000 (hard reset).
*/
NENTRY(_cpu_exception_suspend)
- stc sr, r0 /* r0 = SR */
- mov #0x10, r1
- swap.b r1, r1
- mov r0, r2 /* r2 = r0 */
- swap.w r1, r1 /* r1 = 0x10000000 */
- or r1, r2 /* r2 |= 0x10000000 */
- ldc r2, sr /* SR = r2 */
+ stc sr, r0 /* r0 = SR */
+ mov #0x10, r1 /* bswap32(PSL_BL) - fits immediate */
+ swap.b r1, r1
+ mov r0, r2 /* r2 = r0 */
+ swap.w r1, r1 /* r1 = PSL_BL */
+ or r1, r2 /* r2 |= PSL_BL */
+ ldc r2, sr /* SR = r2 */
rts
- and r1, r0 /* r0 &= 0x10000000 */
+ and r1, r0 /* r0 &= 0x10000000 */
SET_ENTRY_SIZE(_cpu_exception_suspend)
@@ -315,14 +315,14 @@ NENTRY(_cpu_exception_suspend)
* restore 's' exception mask. (SR.BL)
*/
NENTRY(_cpu_exception_resume)
- stc sr, r0 /* r0 = SR */
- mov #0x10, r1
- swap.b r1, r1
- swap.w r1, r1
- not r1, r1 /* r1 = ~0x10000000 */
- and r1, r0 /* r0 &= ~0x10000000 */
- or r4, r0 /* r0 |= old SR.BL */
- ldc r0, sr /* SR = r0 (don't move to delay slot) */
+ stc sr, r0 /* r0 = SR */
+ mov #0x10, r1 /* bswap32(PSL_BL) - fits immediate */
+ swap.b r1, r1
+ swap.w r1, r1
+ not r1, r1 /* r1 = ~PSL_BL */
+ and r1, r0 /* r0 &= ~PSL_BL */
+ or r4, r0 /* r0 |= old SR.BL */
+ ldc r0, sr /* SR = r0 (don't move to delay slot) */
rts
nop
SET_ENTRY_SIZE(_cpu_exception_resume)