summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/nios/NR_Math1.S
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2004-07-16 11:09:34 +0000
committerEric Andersen <andersen@codepoet.org>2004-07-16 11:09:34 +0000
commitc3d50a69839f8d80fc7244fde6e4a57e5e39dd36 (patch)
treec9e27baac7541384b806cce0845f28c1f59b5a2e /libc/sysdeps/linux/nios/NR_Math1.S
parent3cf731bf40f153a73373798085d1f45a80b972d6 (diff)
Pete Popov writes:
Hi Erik, I'm not sure why the NIOS support is not in uClibc -- perhaps the patch was rejected or never submitted? In any case, I'm playing with some NIOS stuff and created this patch against 0.9.26. The work was done by Microtronix. I'm not sure who else contributed to it. It would be great to have the NIOS support available in uClibc so developers don't have to go searching for these bits. Pete
Diffstat (limited to 'libc/sysdeps/linux/nios/NR_Math1.S')
-rw-r--r--libc/sysdeps/linux/nios/NR_Math1.S63
1 files changed, 63 insertions, 0 deletions
diff --git a/libc/sysdeps/linux/nios/NR_Math1.S b/libc/sysdeps/linux/nios/NR_Math1.S
new file mode 100644
index 000000000..5d5169ba8
--- /dev/null
+++ b/libc/sysdeps/linux/nios/NR_Math1.S
@@ -0,0 +1,63 @@
+
+
+ .include "NM_Macros.S"
+
+ .file "okmul.c"
+gcc2_compiled.:
+ .text
+ .p2align 1
+ .globl __mulsi3
+ .type __mulsi3,@function
+__mulsi3:
+
+ ;SKP0 %o0,31
+ ;NEG %o1
+ ;ABS %o0
+
+ .MACRO ZSTEP bit
+ SKP0 %o0,\bit
+ ADD %g0,%o1
+ LSLI %o1,1
+ .ENDM
+
+ MOVI %g0,0
+ ZSTEP 0
+ ZSTEP 1
+ ZSTEP 2
+ ZSTEP 3
+ ZSTEP 4
+ ZSTEP 5
+ ZSTEP 6
+ ZSTEP 7
+ ZSTEP 8
+ ZSTEP 9
+ ZSTEP 10
+ ZSTEP 11
+ ZSTEP 12
+ ZSTEP 13
+ ZSTEP 14
+ ZSTEP 15
+ ZSTEP 16
+ ZSTEP 17
+ ZSTEP 18
+ ZSTEP 19
+ ZSTEP 20
+ ZSTEP 21
+ ZSTEP 22
+ ZSTEP 23
+ ZSTEP 24
+ ZSTEP 25
+ ZSTEP 26
+ ZSTEP 27
+ ZSTEP 28
+ ZSTEP 29
+ ZSTEP 30
+ ZSTEP 31
+ ; No bit 31: we already set %o0 to positive
+
+ JMP %o7
+ MOV %o0,%g0
+
+.Lfe1:
+ .size __mulsi3,.Lfe1-__mulsi3
+