Commit Graph

110 Commits

Author SHA1 Message Date
skrll 2b3543128f I was a bit over zealous with my last change so revert the
locked_return_point change.

Loading the instruction at locked_return_point as a return value didn't
work so well.

Thanks to uwe, cube, and dsl.
2006-01-09 22:17:16 +00:00
uwe 6b8eb49dd6 Use PLT for PIC calls to avoid text relocs in the shared library. 2006-01-06 22:46:14 +00:00
uwe 55ad9313a6 In PIC code call setcontext(2) via PLT to avoid text reloc in the
shared library.
2006-01-04 17:44:53 +00:00
skrll 73b7bdcee7 A couple of fixes to make libpthread really shared, i.e. not have text re-
locations:

	- Don't declare pthread__switch_away global
	- Do the PIC dance for pthread__switch_return_point and
	  pthread__locked_switch. Ideally these (and other) symbols would
	  be hidden.

Thanks to uwe@, dyoung@ and elad@ for help.

XXX sh3 is still to be done.
XXX vax does strange things.
2006-01-04 12:43:43 +00:00
uwe ffaa72c2cc Adapt to new PIC macros that are now in <machine/asm.h>. Same binary
code is generated (still with text relocs, but eliminating them is the
next step).
2005-12-31 05:08:28 +00:00
perry ce666bb8ce __asm__ -> __asm 2005-12-24 23:10:08 +00:00
perry 4e11af46bc Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete. 2005-12-24 21:11:15 +00:00
matt 38b7b2fcde Merge updates to algorithms from i386 switch code. 2005-04-09 20:53:19 +00:00
matt 7fa678813d Add STACKSPACE 2005-04-09 20:50:27 +00:00
matt e722e50c79 Rework and cleanup. Don't use REI, fake a call frame instead. 2005-04-09 20:49:02 +00:00
skrll 32069ca6a3 pt_sleepuc was removed a long time ago. 2004-12-01 14:27:01 +00:00
nathanw 45204d9ceb Punt to setcontext() system call if the PSL_T bit (single-step trap)
is set, so that the single-step trap happens in the thread's context
and not in the middle of _setcontext_u.

XXX might be able to do something here with iret, too, but it needs
more testing.
2004-11-30 21:05:01 +00:00
kent 63a8cde231 save&restore %fs and %gs registers for USER_LDT applications.
PR#26900
2004-11-10 01:12:57 +00:00
fvdl 5febc5eef5 Fix thread context switching to take the stack ABI into account.
From Wolfgang Solfrank.
2004-10-21 16:49:47 +00:00
rearnsha cd8021f51e Use RET macro for returning. 2004-08-21 11:31:44 +00:00
chs e348d7e175 add hppa MD libpthread bits. translated from MIPS. 2004-07-19 03:39:02 +00:00
nathanw cb111b5e34 When _SOFT_FLOAT is defined, don't save or restore user FP context.
(note: still needs some mk rules tweaking for MKSOFTFLOAT=yes to pass
-msoft-float to asm builds).
2004-07-10 20:57:00 +00:00
nathanw 821dde500e Fix a comment to say "Edit" instead of "Exit". 2004-07-07 18:21:33 +00:00
simonb b4f0be566a Catch up with changes to __fpregset_t.
In __longjmp14(), copy the FP CSR from the correct array and array slot.

Completes fix for PR port-mips/25942.
2004-07-03 05:10:06 +00:00
nathanw 44a1e00a08 Remove a comment made obsolete by the previous commit. 2004-06-02 22:39:52 +00:00
uwe 521748fbfa Fix typo in comment. 2004-05-28 22:58:25 +00:00
simonb 9bc855a931 s/the the/the/ (only in sources that aren't regularly imported from
elsewhere).
2004-04-23 02:58:27 +00:00
nathanw 94fc83a6be Add ucontext conversion macros for an "extra" register set. 2004-02-11 21:04:10 +00:00
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