scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | Submodules | README | LICENSE

crt-posix.s (351B)


      1 
      2 	.comm _environ,4,4
      3 
      4 	.text
      5 	.globl	_start
      6 _start:
      7 	stwu	1,-16(1)
      8 	la	31,16(1)
      9 	lwz	3,0(31)		/* argc */
     10 	la	4,4(31)		/* argv */
     11 	lis	14,_environ@h
     12 	ori	14,14,_environ@l
     13 	la	5,0(14)
     14 	mulli	31,3,4		/* p = argc*4 */
     15 	add	31,4,31		/* q = argv + p */
     16 	addi	31,31,4		/* r = q + 4 */
     17 	lwz	31,0(31)	/* r = *r */
     18 	stw	31,0(5)		/* envp = r */
     19 	bl	main
     20 	b	exit