Bug 986 - getcontext, setcontext, swapcontext are not implemeted for e500
Summary: getcontext, setcontext, swapcontext are not implemeted for e500
Status: RESOLVED WONTFIX
Alias: None
Product: glibc
Classification: Unclassified
Component: libc (show other bugs)
Version: 2.3.5
: P1 normal
Target Milestone: ---
Assignee: Steven Munroe
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-31 18:17 UTC by Dinar Temirbulatov
Modified: 2005-09-22 20:23 UTC (History)
3 users (show)

See Also:
Host: i686-pc-linux-gnu
Target: powerpc-linux-gnuspe
Build:
Last reconfirmed:


Attachments
proposed patch (3.10 KB, patch)
2005-05-31 19:23 UTC, Dinar Temirbulatov
Details | Diff
proposed patch (3.67 KB, patch)
2005-06-06 19:40 UTC, Dinar Temirbulatov
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dinar Temirbulatov 2005-05-31 18:17:20 UTC
Such functions don`t work correctly because fpu model is different for e500. For
example by calling getcontext function the process terminates with illegal
instruction error.
Comment 1 Dinar Temirbulatov 2005-05-31 19:23:52 UTC
Created attachment 502 [details]
proposed patch
Comment 2 GOTO Masanori 2005-06-01 11:23:48 UTC
It seems your version is based on old glibc 2.3.2.  In the latest version,
getcontext is existed in (ex) 
sysdeps/unix/sysv/linux/powerpc/powerpc32/ directory and so on.
Could you check it again?
Comment 3 Dinar Temirbulatov 2005-06-01 11:55:07 UTC
yes, sorry I was wrong about 2.3.5. Illegal instruction occurs only under
glibc-2.3.2. But in 2.3.5, it still does not save whole fpu context(64-bit GPRs)
for e500.
Comment 4 GOTO Masanori 2005-06-01 14:57:28 UTC
Steven, could you look at this report?
Comment 5 Steven Munroe 2005-06-01 16:33:47 UTC
 special purpose embeded (Book-E) processor which does not conform to the core
PowerPC architecture. It is a 32-bit (LR,CTR, XER) processor with combined
64-bit GPR/FPR set plus Accumulator.

The current glibc port targets powerpc32 and powerpc64 conform to the SysV ABI
PowerPC[32-bit] Processor Supplement and the 64-bit PowerPC ELF ABI Supplement
and fully support the standard PowerPC Architecure for 32-/64-bit
implementations/modes.

So this is not a bug. The current powerpc32/powerpc64 implementations are
correct according to thier respective ABIs.

e500 would have to be a separate target/ABI. And will require a separate port.
Comment 6 Dinar Temirbulatov 2005-06-06 19:40:05 UTC
Created attachment 508 [details]
proposed patch
Comment 7 Steven Munroe 2005-06-06 21:41:45 UTC
This is not sufficient:

1) setcontext is not the only function that needs to be different between
powerpc32 and e500 what ever. Also the versioning cruft either does not apply or
needs to be different.

2) I don't think your patch has the correct directory path for a add-on port.
Also I don't think the spe is a valid autoconf target plaform.

3) What IS you ABI and where is it documented? 
Comment 8 Ulrich Drepper 2005-09-22 20:23:46 UTC
This is not of any interest since it's not for a regular chip.  Embedded crap
isn't supported in glibc.