Subject: CVS commit: [nathanw_sa] basesrc/lib/libpthread/arch/arm
To: None <source-changes@netbsd.org>
From: Jason R Thorpe <thorpej@netbsd.org>
List: source-changes
Date: 11/21/2001 20:24:40
Module Name:	basesrc
Committed By:	thorpej
Date:		Wed Nov 21 18:24:39 UTC 2001

Modified Files:
	basesrc/lib/libpthread/arch/arm [nathanw_sa]: _context_u.S

Log Message:
Some improvements, based on suggestions from Ben Harris:
* Don't need to save CPSR in GETC(), since it's a callee-saved
  register.  However, stuff a fake one (that indicates USR32 mode)
  into the ucontext in case it is used later in a setcontext(2)
  system call (as is done in one of Nathan's regression tests; this
  last bit from me).
* Only restore CPSR if ! _UC_USER (i.e. context was created by
  getcontext(2)).
* Determine at run-time if we're in USR26 or USR32 by forcing the Z
  flag to be set and then comparing the PC portion of R15 to all of
  R15 (if they're not equal, we're in 26-bit mode).
* Restore banked regs properly in 26-bit mode.

Plus one from me: Don't or _UC_USER | _UC_CPU into uc_flags; set uc_flags
to that value instead.


To generate a diff of this commit:
cvs rdiff -r1.1.2.4 -r1.1.2.5 basesrc/lib/libpthread/arch/arm/_context_u.S

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.