From 81c4d63a74dd2c6d7395d2d1aeae93fbd22d4b16 Mon Sep 17 00:00:00 2001 From: Yann Herklotz Date: Tue, 7 Mar 2017 18:38:52 +0000 Subject: Commiting compiler --- c_compiler/test/ref/02 | Bin 0 -> 672160 bytes c_compiler/test/ref/02.s | 37 ++++++++++++++++++++++++ c_compiler/test/ref/03 | Bin 0 -> 672160 bytes c_compiler/test/ref/03.s | 37 ++++++++++++++++++++++++ c_compiler/test/ref/04 | Bin 0 -> 676304 bytes c_compiler/test/ref/04.s | 71 +++++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 145 insertions(+) create mode 100755 c_compiler/test/ref/02 create mode 100644 c_compiler/test/ref/02.s create mode 100755 c_compiler/test/ref/03 create mode 100644 c_compiler/test/ref/03.s create mode 100755 c_compiler/test/ref/04 create mode 100644 c_compiler/test/ref/04.s (limited to 'c_compiler/test/ref') diff --git a/c_compiler/test/ref/02 b/c_compiler/test/ref/02 new file mode 100755 index 0000000..6efa3df Binary files /dev/null and b/c_compiler/test/ref/02 differ diff --git a/c_compiler/test/ref/02.s b/c_compiler/test/ref/02.s new file mode 100644 index 0000000..5298142 --- /dev/null +++ b/c_compiler/test/ref/02.s @@ -0,0 +1,37 @@ + .file 1 "02.c" + .section .mdebug.abi32 + .previous + .nan legacy + .module fp=xx + .module nooddspreg + .abicalls + .text + .align 2 + .globl main + .set nomips16 + .set nomicromips + .ent main + .type main, @function +main: + .frame $fp,16,$31 # vars= 8, regs= 1/0, args= 0, gp= 0 + .mask 0x40000000,-4 + .fmask 0x00000000,0 + .set noreorder + .set nomacro + addiu $sp,$sp,-16 + sw $fp,12($sp) + move $fp,$sp + li $2,26 # 0x1a + sw $2,4($fp) + lw $2,4($fp) + move $sp,$fp + lw $fp,12($sp) + addiu $sp,$sp,16 + j $31 + nop + + .set macro + .set reorder + .end main + .size main, .-main + .ident "GCC: (Ubuntu 5.4.0-6ubuntu1~16.04.1) 5.4.0 20160609" diff --git a/c_compiler/test/ref/03 b/c_compiler/test/ref/03 new file mode 100755 index 0000000..404308a Binary files /dev/null and b/c_compiler/test/ref/03 differ diff --git a/c_compiler/test/ref/03.s b/c_compiler/test/ref/03.s new file mode 100644 index 0000000..2232b11 --- /dev/null +++ b/c_compiler/test/ref/03.s @@ -0,0 +1,37 @@ + .file 1 "03.c" + .section .mdebug.abi32 + .previous + .nan legacy + .module fp=xx + .module nooddspreg + .abicalls + .text + .align 2 + .globl main + .set nomips16 + .set nomicromips + .ent main + .type main, @function +main: + .frame $fp,16,$31 # vars= 8, regs= 1/0, args= 0, gp= 0 + .mask 0x40000000,-4 + .fmask 0x00000000,0 + .set noreorder + .set nomacro + addiu $sp,$sp,-16 + sw $fp,12($sp) + move $fp,$sp + li $2,15 # 0xf + sw $2,4($fp) + lw $2,4($fp) + move $sp,$fp + lw $fp,12($sp) + addiu $sp,$sp,16 + j $31 + nop + + .set macro + .set reorder + .end main + .size main, .-main + .ident "GCC: (Ubuntu 5.4.0-6ubuntu1~16.04.1) 5.4.0 20160609" diff --git a/c_compiler/test/ref/04 b/c_compiler/test/ref/04 new file mode 100755 index 0000000..1ae97bf Binary files /dev/null and b/c_compiler/test/ref/04 differ diff --git a/c_compiler/test/ref/04.s b/c_compiler/test/ref/04.s new file mode 100644 index 0000000..c104d42 --- /dev/null +++ b/c_compiler/test/ref/04.s @@ -0,0 +1,71 @@ + .file 1 "04.c" + .section .mdebug.abi32 + .previous + .nan legacy + .module fp=xx + .module nooddspreg + .abicalls + .text + .align 2 + .globl main + .set nomips16 + .set nomicromips + .ent main + .type main, @function +main: + .frame $fp,16,$31 # vars= 8, regs= 1/0, args= 0, gp= 0 + .mask 0x40000000,-4 + .fmask 0x00000000,0 + .set noreorder + .set nomacro + addiu $sp,$sp,-16 + sw $fp,12($sp) + move $fp,$sp + li $2,3 # 0x3 + sw $2,0($fp) + li $2,5 # 0x5 + sw $2,4($fp) + lw $3,0($fp) + lw $2,4($fp) + addu $2,$3,$2 + move $sp,$fp + lw $fp,12($sp) + addiu $sp,$sp,16 + j $31 + nop + + .set macro + .set reorder + .end main + .size main, .-main + .align 2 + .globl f + .set nomips16 + .set nomicromips + .ent f + .type f, @function +f: + .frame $fp,8,$31 # vars= 0, regs= 1/0, args= 0, gp= 0 + .mask 0x40000000,-4 + .fmask 0x00000000,0 + .set noreorder + .set nomacro + addiu $sp,$sp,-8 + sw $fp,4($sp) + move $fp,$sp + sw $4,8($fp) + sw $5,12($fp) + lw $3,8($fp) + lw $2,12($fp) + addu $2,$3,$2 + move $sp,$fp + lw $fp,4($sp) + addiu $sp,$sp,8 + j $31 + nop + + .set macro + .set reorder + .end f + .size f, .-f + .ident "GCC: (Ubuntu 5.4.0-6ubuntu1~16.04.1) 5.4.0 20160609" -- cgit