diff options
author | Yann Herklotz <ymherklotz@gmail.com> | 2017-03-07 18:38:52 +0000 |
---|---|---|
committer | Yann Herklotz <ymherklotz@gmail.com> | 2017-03-07 18:38:52 +0000 |
commit | 81c4d63a74dd2c6d7395d2d1aeae93fbd22d4b16 (patch) | |
tree | f2de4aa2af8a216769f3034b91af4836e368f766 /c_compiler | |
parent | 30f7753bb64ad95750dbd6bce9b7ab3c077b92aa (diff) | |
download | Compiler-81c4d63a74dd2c6d7395d2d1aeae93fbd22d4b16.tar.gz Compiler-81c4d63a74dd2c6d7395d2d1aeae93fbd22d4b16.zip |
Commiting compiler
Diffstat (limited to 'c_compiler')
-rwxr-xr-x | c_compiler/test/out/01 | bin | 0 -> 672108 bytes | |||
-rw-r--r-- | c_compiler/test/out/01.s | 12 | ||||
-rwxr-xr-x | c_compiler/test/out/02 | bin | 0 -> 672108 bytes | |||
-rw-r--r-- | c_compiler/test/out/02.s | 11 | ||||
-rw-r--r-- | c_compiler/test/out/02.stderr.txt | 0 | ||||
-rwxr-xr-x | c_compiler/test/out/03 | bin | 0 -> 672108 bytes | |||
-rw-r--r-- | c_compiler/test/out/03.s | 11 | ||||
-rw-r--r-- | c_compiler/test/out/03.stderr.txt | 0 | ||||
-rwxr-xr-x | c_compiler/test/out/04 | bin | 0 -> 676220 bytes | |||
-rw-r--r-- | c_compiler/test/out/04.s | 22 | ||||
-rw-r--r-- | c_compiler/test/out/04.stderr.txt | 0 | ||||
-rwxr-xr-x | c_compiler/test/ref/02 | bin | 0 -> 672160 bytes | |||
-rw-r--r-- | c_compiler/test/ref/02.s | 37 | ||||
-rwxr-xr-x | c_compiler/test/ref/03 | bin | 0 -> 672160 bytes | |||
-rw-r--r-- | c_compiler/test/ref/03.s | 37 | ||||
-rwxr-xr-x | c_compiler/test/ref/04 | bin | 0 -> 676304 bytes | |||
-rw-r--r-- | c_compiler/test/ref/04.s | 71 |
17 files changed, 201 insertions, 0 deletions
diff --git a/c_compiler/test/out/01 b/c_compiler/test/out/01 Binary files differnew file mode 100755 index 0000000..068ecc4 --- /dev/null +++ b/c_compiler/test/out/01 diff --git a/c_compiler/test/out/01.s b/c_compiler/test/out/01.s new file mode 100644 index 0000000..2fdc6fa --- /dev/null +++ b/c_compiler/test/out/01.s @@ -0,0 +1,12 @@ + .text + .globl main +main: + addiu $sp,$sp,-8 + sw $fp,4($sp) + move $fp,$sp + li $2,13 + move $sp,$fp + lw $fp,4($sp) + addiu $sp,$sp,8 + jr $31 + nop diff --git a/c_compiler/test/out/02 b/c_compiler/test/out/02 Binary files differnew file mode 100755 index 0000000..a020bfc --- /dev/null +++ b/c_compiler/test/out/02 diff --git a/c_compiler/test/out/02.s b/c_compiler/test/out/02.s new file mode 100644 index 0000000..eae78d0 --- /dev/null +++ b/c_compiler/test/out/02.s @@ -0,0 +1,11 @@ + .text + .globl main +main: + addiu $sp,$sp,-12 + sw $fp,8($sp) + move $fp,$sp + move $sp,$fp + lw $fp,8($sp) + addiu $sp,$sp,12 + jr $31 + nop diff --git a/c_compiler/test/out/02.stderr.txt b/c_compiler/test/out/02.stderr.txt new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/c_compiler/test/out/02.stderr.txt diff --git a/c_compiler/test/out/03 b/c_compiler/test/out/03 Binary files differnew file mode 100755 index 0000000..a020bfc --- /dev/null +++ b/c_compiler/test/out/03 diff --git a/c_compiler/test/out/03.s b/c_compiler/test/out/03.s new file mode 100644 index 0000000..eae78d0 --- /dev/null +++ b/c_compiler/test/out/03.s @@ -0,0 +1,11 @@ + .text + .globl main +main: + addiu $sp,$sp,-12 + sw $fp,8($sp) + move $fp,$sp + move $sp,$fp + lw $fp,8($sp) + addiu $sp,$sp,12 + jr $31 + nop diff --git a/c_compiler/test/out/03.stderr.txt b/c_compiler/test/out/03.stderr.txt new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/c_compiler/test/out/03.stderr.txt diff --git a/c_compiler/test/out/04 b/c_compiler/test/out/04 Binary files differnew file mode 100755 index 0000000..a23dad4 --- /dev/null +++ b/c_compiler/test/out/04 diff --git a/c_compiler/test/out/04.s b/c_compiler/test/out/04.s new file mode 100644 index 0000000..992f12a --- /dev/null +++ b/c_compiler/test/out/04.s @@ -0,0 +1,22 @@ + .text + .globl main +main: + addiu $sp,$sp,-16 + sw $fp,12($sp) + move $fp,$sp + move $sp,$fp + lw $fp,12($sp) + addiu $sp,$sp,16 + jr $31 + nop + .text + .globl f +f: + addiu $sp,$sp,-8 + sw $fp,4($sp) + move $fp,$sp + move $sp,$fp + lw $fp,4($sp) + addiu $sp,$sp,8 + jr $31 + nop diff --git a/c_compiler/test/out/04.stderr.txt b/c_compiler/test/out/04.stderr.txt new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/c_compiler/test/out/04.stderr.txt diff --git a/c_compiler/test/ref/02 b/c_compiler/test/ref/02 Binary files differnew file mode 100755 index 0000000..6efa3df --- /dev/null +++ b/c_compiler/test/ref/02 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 Binary files differnew file mode 100755 index 0000000..404308a --- /dev/null +++ b/c_compiler/test/ref/03 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 Binary files differnew file mode 100755 index 0000000..1ae97bf --- /dev/null +++ b/c_compiler/test/ref/04 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" |