⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 06-control-flow.out

📁 用Java实现的编译器。把源代码编译成SPARC汇编程序
💻 OUT
字号:
    ! SPARC assembly:     ! Automatically generated by ASM.SPARCGenerator.section	".data".GLOBALFIELD:.ARRAY_OUT_OF_BOUND:	.asciz "testcases/codegen/06-control-flow.dcf:%d: runtime error: array out of bound; accessing: %d, array size: %d\n"	.align 4.DIVISION_ZERO:	.asciz "testcases/codegen/06-control-flow.dcf:%d: runtime error: division to zero\n"	.align 4.CONTROL_FALLING_OFF:	.asciz "testcases/codegen/06-control-flow.dcf:%s: runtime error: control falling off the end of the method: %s\n"	.align 4.section	".text"	.align 4	.global main	.globl mainmain:	sethi	%hi(.GLOBALFIELD), %g2	or	%g2, %lo(.GLOBALFIELD), %g2	save	%sp, -104, %sp.WhileCondition1:	! Load instruction for the location identifier:  i	ld	[%fp-4], %l0	! Move instruction for the int literal:  10	mov	10, %l1	cmp	%l0, %l1	bl	.True2	nop	mov	0, %l2	b	.End2	nop.True2:	mov	1, %l2.End2:	cmp	%g0, %l2	be	.End1	nop	! Load instruction for the location identifier:  sum	ld	[%fp-8], %l0	! Load instruction for the location identifier:  i	ld	[%fp-4], %l1	add	%l0, %l1, %l2	!Location id store instruction for stmt location:   sum = expression	st	%l2, [%fp-8]	! Load instruction for the location identifier:  i	ld	[%fp-4], %l0	! Move instruction for the int literal:  1	mov	1, %l1	add	%l0, %l1, %l2	!Location id store instruction for stmt location:   i = expression	st	%l2, [%fp-4]	b	.WhileCondition1	nop.End1:	! Load instruction for the location identifier:  sum	ld	[%fp-8], %l0	! Move instruction for the int literal:  45	mov	45, %l1	cmp	%l0, %l1	bne	.True4	nop	mov	0, %l2	b	.End4	nop.True4:	mov	1, %l2.End4:	cmp	%g0, %l2	be	.False3	nop	mov	8, %g3	sub	%sp, %g3, %sp	sethi	%hi(.CalloutArg5), %g1	or	%g1, %lo(.CalloutArg5), %g1	! Preparing parameter -> sp% + offset:  	st	%g1, [%sp+92]	! Preparing parameter -> Ro:  	ld	[%sp+92], %o0	call	printf,0	nop	mov	%o0, %l0	mov	8, %g3	add	%sp, %g3, %sp	b	.End3	nop.False3:.End3:	! Move instruction for the int literal:  11	mov	11, %l0	!Location id store instruction for stmt location:   i = expression	st	%l0, [%fp-4].WhileCondition6:	! Load instruction for the location identifier:  i	ld	[%fp-4], %l0	! Move instruction for the int literal:  10	mov	10, %l1	cmp	%l0, %l1	bl	.True7	nop	mov	0, %l2	b	.End7	nop.True7:	mov	1, %l2.End7:	cmp	%g0, %l2	be	.End6	nop	! Load instruction for the location identifier:  i	ld	[%fp-4], %l0	! Move instruction for the int literal:  1	mov	1, %l1	add	%l0, %l1, %l2	!Location id store instruction for stmt location:   i = expression	st	%l2, [%fp-4]	b	.WhileCondition6	nop.End6:	! Load instruction for the location identifier:  i	ld	[%fp-4], %l0	! Move instruction for the int literal:  11	mov	11, %l1	cmp	%l0, %l1	bne	.True9	nop	mov	0, %l2	b	.End9	nop.True9:	mov	1, %l2.End9:	cmp	%g0, %l2	be	.False8	nop	mov	8, %g3	sub	%sp, %g3, %sp	sethi	%hi(.CalloutArg10), %g1	or	%g1, %lo(.CalloutArg10), %g1	! Preparing parameter -> sp% + offset:  	st	%g1, [%sp+92]	! Preparing parameter -> Ro:  	ld	[%sp+92], %o0	call	printf,0	nop	mov	%o0, %l0	mov	8, %g3	add	%sp, %g3, %sp	b	.End8	nop.False8:.End8:	! Move instruction for the int literal:  1	mov	1, %l0	! Move instruction for the int literal:  2	mov	2, %l1	cmp	%l0, %l1	bg	.True12	nop	mov	0, %l2	b	.End12	nop.True12:	mov	1, %l2.End12:	cmp	%g0, %l2	be	.False11	nop	mov	8, %g3	sub	%sp, %g3, %sp	sethi	%hi(.CalloutArg13), %g1	or	%g1, %lo(.CalloutArg13), %g1	! Preparing parameter -> sp% + offset:  	st	%g1, [%sp+92]	! Preparing parameter -> Ro:  	ld	[%sp+92], %o0	call	printf,0	nop	mov	%o0, %l0	mov	8, %g3	add	%sp, %g3, %sp	b	.End11	nop.False11:.End11:	! Move instruction for the int literal:  1	mov	1, %l0	! Move instruction for the int literal:  2	mov	2, %l1	cmp	%l0, %l1	bl	.True15	nop	mov	0, %l2	b	.End15	nop.True15:	mov	1, %l2.End15:	cmp	%g0, %l2	be	.False14	nop	b	.End14	nop.False14:	mov	8, %g3	sub	%sp, %g3, %sp	sethi	%hi(.CalloutArg16), %g1	or	%g1, %lo(.CalloutArg16), %g1	! Preparing parameter -> sp% + offset:  	st	%g1, [%sp+92]	! Preparing parameter -> Ro:  	ld	[%sp+92], %o0	call	printf,0	nop	mov	%o0, %l0	mov	8, %g3	add	%sp, %g3, %sp.End14:	mov	8, %g3	sub	%sp, %g3, %sp	sethi	%hi(.CalloutArg17), %g1	or	%g1, %lo(.CalloutArg17), %g1	! Preparing parameter -> sp% + offset:  	st	%g1, [%sp+92]	! Preparing parameter -> Ro:  	ld	[%sp+92], %o0	call	printf,0	nop	mov	%o0, %l0	mov	8, %g3	add	%sp, %g3, %sp	!Return statement for method:	ret	restore	!Datasection.CalloutArg5:	.asciz "ERROR: while loop is bad (1)\n"	.align 8.CalloutArg10:	.asciz "ERROR: while loop is bad (2)\n"	.align 8.CalloutArg13:	.asciz "ERROR: true branch is bad (2)\n"	.align 8.CalloutArg16:	.asciz "ERROR: else branch is bad (2)\n"	.align 8.CalloutArg17:	.asciz "control flow OK if no previous output\n"	.align 8.MDNAME_main:	.asciz "'main( )'"	.align 8.MDNAME_main_LINE_NO:	.asciz "37"	.align 8

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -