Wed Jan 3 20:06:02 2018 UTC ()
Pull up following revision(s) (requested by maya in ticket #1530):
	sys/arch/sparc/sparc/locore.s: revision 1.269
Avoid an instruction requiring a higher alignment than we are guaranteed
Fixes PR port-sparc/52721: ddb errors on ps command
Thanks to mlelstv.


(snj)
diff -r1.268 -r1.268.16.1 src/sys/arch/sparc/sparc/locore.s

cvs diff -r1.268 -r1.268.16.1 src/sys/arch/sparc/sparc/locore.s (expand / switch to unified diff)

--- src/sys/arch/sparc/sparc/locore.s 2012/11/04 00:32:47 1.268
+++ src/sys/arch/sparc/sparc/locore.s 2018/01/03 20:06:02 1.268.16.1
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: locore.s,v 1.268 2012/11/04 00:32:47 chs Exp $ */ 1/* $NetBSD: locore.s,v 1.268.16.1 2018/01/03 20:06:02 snj Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 1996 Paul Kranenburg 4 * Copyright (c) 1996 Paul Kranenburg
5 * Copyright (c) 1996 5 * Copyright (c) 1996
6 * The President and Fellows of Harvard College. All rights reserved. 6 * The President and Fellows of Harvard College. All rights reserved.
7 * Copyright (c) 1992, 1993 7 * Copyright (c) 1992, 1993
8 * The Regents of the University of California. All rights reserved. 8 * The Regents of the University of California. All rights reserved.
9 * 9 *
10 * This software was developed by the Computer Systems Engineering group 10 * This software was developed by the Computer Systems Engineering group
11 * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and 11 * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
12 * contributed to Berkeley. 12 * contributed to Berkeley.
13 * 13 *
14 * All advertising materials mentioning features or use of this software 14 * All advertising materials mentioning features or use of this software
@@ -6278,28 +6278,29 @@ Lpanic_ljmp: @@ -6278,28 +6278,29 @@ Lpanic_ljmp:
6278 _ALIGN 6278 _ALIGN
6279 6279
6280ENTRY(longjmp) 6280ENTRY(longjmp)
6281 addcc %o1, %g0, %g6 ! compute v ? v : 1 in a global register 6281 addcc %o1, %g0, %g6 ! compute v ? v : 1 in a global register
6282 be,a 0f 6282 be,a 0f
6283 mov 1, %g6 6283 mov 1, %g6
62840: 62840:
6285 mov %o0, %g1 ! save a in another global register 6285 mov %o0, %g1 ! save a in another global register
6286 ld [%g1+8], %g7 /* get caller's frame */ 6286 ld [%g1+8], %g7 /* get caller's frame */
62871: 62871:
6288 cmp %fp, %g7 ! compare against desired frame 6288 cmp %fp, %g7 ! compare against desired frame
6289 bl,a 1b ! if below, 6289 bl,a 1b ! if below,
6290 restore ! pop frame and loop 6290 restore ! pop frame and loop
6291 be,a 2f ! if there, 6291 ld [%g1+0], %o2 ! fetch return %sp
6292 ldd [%g1+0], %o2 ! fetch return %sp and pc, and get out 6292 be,a 2f ! we're there, get out
 6293 ld [%g1+4], %o3 ! fetch return pc
6293 6294
6294Llongjmpbotch: 6295Llongjmpbotch:
6295 ! otherwise, went too far; bomb out 6296 ! otherwise, went too far; bomb out
6296 save %sp, -CCFSZ, %sp /* preserve current window */ 6297 save %sp, -CCFSZ, %sp /* preserve current window */
6297 sethi %hi(Lpanic_ljmp), %o0 6298 sethi %hi(Lpanic_ljmp), %o0
6298 call _C_LABEL(panic) 6299 call _C_LABEL(panic)
6299 or %o0, %lo(Lpanic_ljmp), %o0; 6300 or %o0, %lo(Lpanic_ljmp), %o0;
6300 unimp 0 6301 unimp 0
6301 6302
63022: 63032:
6303 cmp %o2, %sp ! %sp must not decrease 6304 cmp %o2, %sp ! %sp must not decrease
6304 bge,a 3f 6305 bge,a 3f
6305 mov %o2, %sp ! it is OK, put it in place 6306 mov %o2, %sp ! it is OK, put it in place