he
ea56bcee84
Hide the register number constants behind an _R_ prefix, and also
...
rename FPBASE to _FPBASE, so that we avoid polluting the user's
name space when e.g. <sys/ptrace.h> is included. Previously, the
PC symbol in mips/regnum.h would conflict with the declaration of
the external variable by the same name in termcap.h, as discovered
by the ``okheaders'' regression test.
2003-11-26 08:36:49 +00:00
christos
adfca9e3e4
This is not needed anymore.
2003-11-25 22:41:12 +00:00
christos
6477735848
m68k does not sigcontext<->mcontext anymore.
2003-11-25 21:27:30 +00:00
uwe
6d08061385
Do not move incoming paramters to callee-save registers when not
...
necessary. Saves about a dozen of instructions.
2003-11-20 17:55:11 +00:00
uwe
b3c165e505
Add _INITCONTEXT_U_MD, we need to clean _REG_SR.
2003-11-20 17:38:08 +00:00
uwe
1e78682585
In pthread__locked_switch set self->pt_uc only when the context is inited.
...
In STACK_SWITCH subtract STACKSPACE, not add it (it's zero for now anyway).
2003-11-20 03:31:02 +00:00
uwe
024d461f8f
First cut at pthreads MD code for sh3. Based on m68k version.
...
Regression tests still failing: sem, sigalarm.
2003-11-18 03:11:41 +00:00
uwe
f9cb911365
Add necessary symbols.
2003-11-18 03:07:29 +00:00
uwe
764c596c3f
Cause SIGTRAP if NOTREACHED code is reached.
2003-11-17 22:38:11 +00:00
martin
3e8ef3d56a
Fix ucontext conversion macros. From Christian Limpach.
2003-11-11 16:21:05 +00:00
martin
d708163f7f
All the ucontext <-> {fp}reg macros were slightly simplistic and untested
...
before (old gdb support on sparc did not use this).
Pointed out by Christian Limpach.
2003-11-10 07:52:52 +00:00
fvdl
c4e432f3bd
Make register usage more consistent, also in comparison with the i386
...
version, for easier maintenance.
2003-11-08 21:46:42 +00:00
fvdl
127827f46e
Restore %rax correctly during a full context restore (oops).
2003-11-08 21:45:59 +00:00
yamt
71b290e975
use explicit "l" suffixes. (eg. lea -> leal)
2003-10-30 13:56:37 +00:00
fvdl
c2405107f1
Correct and simplify computing the return point; just use PC-relative
...
addressing.
2003-10-20 14:50:18 +00:00
fvdl
b30e737545
Make sure the stack stays aligned.
2003-10-19 21:45:03 +00:00
chs
f58c80fc8f
fix typo in previous.
2003-10-12 00:25:25 +00:00
cl
bfa716044e
SA_SIGINFO support for m68k (libpthread)
2003-09-22 14:45:48 +00:00
cl
c6de69ee49
fix pt_trapuc handling errors:
...
- movl to address register doesn't set flags (add explicit test)
- clr only clears a word (use clrl)
2003-09-17 20:08:07 +00:00
cl
89d0cfd21f
Remove possible race condition in upcall recycling.
2003-09-07 14:47:44 +00:00
uwe
b5623b232f
Use delay slot in STACK_SWITCH (catching up with sparc64 changes).
2003-09-07 02:08:31 +00:00
uwe
7d522ba08b
Use correct context to switch to.
...
From sparc64 fix by Andrey Petrov <petrov@netbsd>.
2003-09-07 01:54:47 +00:00
petrov
0d472e116b
typo in previous commit, annul isn't good there,
...
noticed by Eduardo Horvath.
2003-08-26 17:50:06 +00:00
petrov
2cae323122
Use branch-slot in STACK_SWITCH, suggested by Martin Husemann.
2003-08-25 23:00:23 +00:00
petrov
c139cd4893
Use correct context to switch to.
2003-08-25 22:48:24 +00:00
ragge
644236bf71
Add PT_TRAPUC and pthread__switch_return_point.
...
Not tested (as most of the pthread stuff on vax) but at least
allow the system to compile.
2003-08-25 20:32:13 +00:00
scw
46fc66f7d8
Adapt to Nathan's recent pt_trapuc/pt_sleepuc change.
2003-08-12 14:01:08 +00:00
agc
eb7c1594f1
Move UCB-licensed code from 4-clause to 3-clause licence.
...
Patches provided by Joel Baker in PR 22280, verified by myself.
2003-08-07 16:42:00 +00:00
kleink
7d3a44f705
Remove PT_SLEEPUC, which somehow wasn't.
2003-07-29 15:18:49 +00:00
salo
99410184e7
netbsd.org->NetBSD.org
2003-07-26 19:24:24 +00:00
mrg
9759912dd6
need <string.h>
2003-07-26 18:33:06 +00:00
skrll
795970599f
Typo in comment.
2003-07-24 08:03:44 +00:00
nathanw
d37a996a49
Adapt to structure name changes.
2003-07-17 20:55:25 +00:00
matt
0f8d87a96d
Update to new world order. **not tested** But will allow builds to
...
finish.
2003-07-09 00:55:45 +00:00
uwe
ea81adf86a
Not that the branch in SETC doens't have a delay slot, remove the
...
.empty comment as it's no longer pertinent.
2003-07-05 23:01:25 +00:00
marcus
4e24351384
PIC patch from Valeriy E. Ushakov applied.
...
Also, removed bogus delay slot flag from branch instruction.
2003-07-05 22:50:09 +00:00
marcus
cccf9dfce5
The field "pt_sleepuc" doesn't exist in struct pthread_st.
2003-07-05 21:27:23 +00:00
nathanw
9639eeaf54
Adapt to pt_trapuc: change STACK_SWITCH to check for a value in pt_trapuc
...
and use it preferentially to a value in pt_uc, clearing it once on the new
stack. Move stores into pt_uc back to before the stack switch; storing
after the stack switch opened a one-instruction race condition where an upcall
that had just started a chain could be preempted again, and would bomb when
restarted due to its pt_uc not yet having been updated. Now that pt_trapuc
is what the upcall code writes to, it is safe to store to pt_uc before
switching stacks.
Remove obsolete pt_sleepuc code.
2003-06-26 01:45:31 +00:00
nathanw
1414a095ac
Remove PT_SLEEPUC and add PT_TRAPUC.
2003-06-26 01:29:28 +00:00
nathanw
39f9ecfa06
Oops, reordering the PT_STATE/PT_SWITCHTOUC/PT_SWITCHTO assembly
...
killed a live value too soon. Fix by using a different register for
the PT_STATE immediate.
2003-06-24 18:54:56 +00:00
nathanw
96458e8892
Update the switch_return point name in the static case.
2003-06-23 22:50:23 +00:00
uwe
b92f152573
First bits of SH3 support. Only _context_u.S is implemented (passess
...
cu[1-6] tests), the pthread_switch.S is stubbed out for now.
Code posted by Christian Groessler (cpg at aladdin dot de) to port-sh3.
2003-06-23 19:34:43 +00:00
martin
f546abe798
Catch up with Nathan's changes to other archs.
2003-06-17 23:18:48 +00:00
martin
aba86b525b
Catch up with changes Nathan did to other archs.
2003-06-15 17:11:36 +00:00
scw
7d221cb560
Apply Nathan's switch-away fix and previous save-PT_UC from new stack fix.
2003-06-13 08:07:03 +00:00
scw
04f197eae9
Apply Nathan's switch-away fix and previous save-PT_UC from new stack fix.
...
Compile-tested only.
2003-06-13 07:45:17 +00:00
nathanw
4bd45b7b3b
Oops, that's switch_return_point, not locked_return_point. The perils
...
of cut-and-paste.
2003-06-12 23:19:27 +00:00
nathanw
aa6f5de228
STACKSPACE of 16 is too small, given the use of CALLFRAME_SIZ;
...
increase to match.
2003-06-12 23:01:17 +00:00
nathanw
eb6ba6fbef
Apply switch-away fix and previous save-PT_UC from new stack fix.
2003-06-12 23:00:28 +00:00
fvdl
1a31b8db4d
Apply Nathan's switch-away fix.
2003-06-12 22:03:18 +00:00