diff options
Diffstat (limited to 'libc/sysdeps/linux/sparc/sparcv8/sdiv.S')
-rw-r--r-- | libc/sysdeps/linux/sparc/sparcv8/sdiv.S | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/libc/sysdeps/linux/sparc/sparcv8/sdiv.S b/libc/sysdeps/linux/sparc/sparcv8/sdiv.S new file mode 100644 index 000000000..4ac901a77 --- /dev/null +++ b/libc/sysdeps/linux/sparc/sparcv8/sdiv.S @@ -0,0 +1,18 @@ +/* + * Sparc v8 has divide. + */ + +ENTRY(.div) + + sra %o0, 31, %o2 + wr %o2, 0, %y + nop + nop + nop + sdivcc %o0, %o1, %o0 + bvs,a 1f + xnor %o0, %g0, %o0 +1: retl + nop + +END(.div) |