From 9f984867cd1b2959feb5fd11eaac55e0339a1e40 Mon Sep 17 00:00:00 2001 From: Xavier Leroy Date: Fri, 28 Oct 2016 11:02:48 +0200 Subject: powerpc/runtime: add comments --- runtime/powerpc/i64_smulh.s | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'runtime/powerpc') diff --git a/runtime/powerpc/i64_smulh.s b/runtime/powerpc/i64_smulh.s index 4dc97a48..f01855f3 100644 --- a/runtime/powerpc/i64_smulh.s +++ b/runtime/powerpc/i64_smulh.s @@ -62,7 +62,8 @@ __i64_smulh: addc r8, r8, r0 mulhwu r0, r3, r5 # r0 = high half of XH.YH adde r7, r7, r0 -# Test signs +# Here r7:r8 contains the high 64 bits of the unsigned product. +# Now, test signs and subtract if needed srawi r0, r3, 31 # r0 = -1 if X < 0, r0 = 0 if X >= 0 srawi r9, r5, 31 # r9 = -1 if Y < 0, r9 = 0 if Y >= 0 and r3, r3, r9 # set X = 0 if Y >= 0 -- cgit