summaryrefslogtreecommitdiff
path: root/newlib/libc/sys/a29khif/_sbrk.s
diff options
context:
space:
mode:
authorPikalaxALT <pikalaxalt@gmail.com>2017-12-15 09:38:53 -0500
committerPikalaxALT <pikalaxalt@gmail.com>2017-12-15 09:39:34 -0500
commitf95a4a932476be2ba99e2fd081e8d2bc6ea12813 (patch)
tree75f67192cb2d7b7b575c94edda318e475239b63c /newlib/libc/sys/a29khif/_sbrk.s
parentf60aca96985e68c7d8a52eb7bc955fb80e132f73 (diff)
Import newlib and create makefile
Diffstat (limited to 'newlib/libc/sys/a29khif/_sbrk.s')
-rw-r--r--newlib/libc/sys/a29khif/_sbrk.s30
1 files changed, 30 insertions, 0 deletions
diff --git a/newlib/libc/sys/a29khif/_sbrk.s b/newlib/libc/sys/a29khif/_sbrk.s
new file mode 100644
index 0000000..33c1269
--- /dev/null
+++ b/newlib/libc/sys/a29khif/_sbrk.s
@@ -0,0 +1,30 @@
+ .file "sbrk.c"
+ .sect .lit,lit
+gcc2_compiled.:
+ .text
+ .align 4
+ .global __sbrk
+ .word 0x30000
+__sbrk:
+ sub gr1,gr1,16
+ asgeu V_SPILL,gr1,gr126
+ add lr1,gr1,28
+ sll lr2,lr6,0
+ jmpt lr2,L4
+ constn gr96,65535
+ const gr116,__sysalloc
+ consth gr116,__sysalloc
+ calli lr0,gr116
+ nop
+ sll gr117,gr96,0
+ cpneq gr116,gr117,0
+ jmpf gr116,L4
+ constn gr96,65535
+ sll gr96,gr117,0
+L4:
+ add gr1,gr1,16
+ nop
+ jmpi lr0
+ asleu V_FILL,lr1,gr127
+
+