mirror of
git://sourceware.org/git/glibc.git
synced 2025-03-13 13:37:38 +08:00
powerpc: Fix handling of scv return error codes [BZ #27892]
When using scv for templated ASM syscalls, current code interprets any negative return value as error, but the only valid error codes are in the range -4095..-1 according to the ABI. This commit also fixes 'signal.gen.test' strace test, where the issue was first identified. Reviewed-by: Matheus Castanho <msc@linux.ibm.com>
This commit is contained in:
parent
79aec84102
commit
7de36744ee
@ -398,8 +398,9 @@ LT_LABELSUFFIX(name,_name_end): ; \
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define RET_SCV \
|
#define RET_SCV \
|
||||||
cmpdi r3,0; \
|
li r9,-4095; \
|
||||||
bgelr+; \
|
cmpld r3,r9; \
|
||||||
|
bltlr+; \
|
||||||
neg r3,r3;
|
neg r3,r3;
|
||||||
|
|
||||||
#define RET_SC \
|
#define RET_SC \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user