mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-22 13:00:06 +00: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
|
||||
|
||||
#define RET_SCV \
|
||||
cmpdi r3,0; \
|
||||
bgelr+; \
|
||||
li r9,-4095; \
|
||||
cmpld r3,r9; \
|
||||
bltlr+; \
|
||||
neg r3,r3;
|
||||
|
||||
#define RET_SC \
|
||||
|
Loading…
Reference in New Issue
Block a user