diff options
author | Xavier Leroy <xavier.leroy@inria.fr> | 2016-10-28 11:02:48 +0200 |
---|---|---|
committer | Xavier Leroy <xavier.leroy@inria.fr> | 2016-10-28 11:02:48 +0200 |
commit | 9f984867cd1b2959feb5fd11eaac55e0339a1e40 (patch) | |
tree | f445baced9c1e709e3b6447a407e203981d343a5 /runtime/powerpc | |
parent | 7d029e3037b64dca6224151ea143d23cd03a26cd (diff) | |
download | compcert-9f984867cd1b2959feb5fd11eaac55e0339a1e40.tar.gz compcert-9f984867cd1b2959feb5fd11eaac55e0339a1e40.zip |
powerpc/runtime: add comments
Diffstat (limited to 'runtime/powerpc')
-rw-r--r-- | runtime/powerpc/i64_smulh.s | 3 |
1 files changed, 2 insertions, 1 deletions
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 |