aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2004-08-23 02:58:14 +0000
committerH. Peter Anvin <hpa@zytor.com>2004-08-23 02:58:14 +0000
commitb2cbff841b0038f29d94e3d44da2daf4f1c04272 (patch)
tree781266369d8179b666f3904d2f25628c71e5ed08
parentf22381d738025d532777e09dc54b150944862389 (diff)
downloadklibc-b2cbff841b0038f29d94e3d44da2daf4f1c04272.tar.gz
Fix ppc64 handling of syscall errorklibc-0.168
-rw-r--r--klibc/arch/ppc64/sysstub.ph6
1 files changed, 4 insertions, 2 deletions
diff --git a/klibc/arch/ppc64/sysstub.ph b/klibc/arch/ppc64/sysstub.ph
index 6292f057d249b..1469cc6071ad7 100644
--- a/klibc/arch/ppc64/sysstub.ph
+++ b/klibc/arch/ppc64/sysstub.ph
@@ -23,8 +23,10 @@ sub make_sysstub($$$$@) {
print OUT ".${fname}:\n";
print OUT "\tli 0,__NR_${sname}\n";
print OUT "\tsc\n";
- print OUT "\tbnslr\n";
- print OUT "\tb __syscall_error\n";
+ print OUT "\tmfcr 0\n";
+ print OUT "\trldicl. 9,0,36,63\n";
+ print OUT "\tbeqlr- 0\n";
+ print OUT "\tb .__syscall_error\n";
print OUT "\t.size .${fname},.-.${fname}\n";
close(OUT);
}