aboutsummaryrefslogtreecommitdiffstats
path: root/c_compiler/test/ref
diff options
context:
space:
mode:
authorYann Herklotz <ymherklotz@gmail.com>2017-03-10 21:23:53 +0000
committerYann Herklotz <ymherklotz@gmail.com>2017-03-10 21:23:53 +0000
commit7606b62bc81fd8ea55a6a65104be273f954e70c1 (patch)
tree268376c7926f6dbe4fd2f98df30c3e00d8018314 /c_compiler/test/ref
parentd7a31b4cbcc50c46ff3ea671e120d29c68d36795 (diff)
downloadCompiler-7606b62bc81fd8ea55a6a65104be273f954e70c1.tar.gz
Compiler-7606b62bc81fd8ea55a6a65104be273f954e70c1.zip
Changed simple test case
Diffstat (limited to 'c_compiler/test/ref')
-rwxr-xr-xc_compiler/test/ref/ComplexAssignmentbin0 -> 676272 bytes
-rw-r--r--c_compiler/test/ref/ComplexAssignment.s65
-rwxr-xr-xc_compiler/test/ref/ScopeWithAddbin0 -> 676264 bytes
-rw-r--r--c_compiler/test/ref/ScopeWithAdd.s43
-rwxr-xr-xc_compiler/test/ref/SimpleAddbin0 -> 676264 bytes
-rw-r--r--c_compiler/test/ref/SimpleAdd.s41
-rwxr-xr-xc_compiler/test/ref/SimpleAdd_2bin0 -> 676264 bytes
-rw-r--r--c_compiler/test/ref/SimpleAdd_2.s40
-rwxr-xr-xc_compiler/test/ref/SimpleAssignmentbin0 -> 672172 bytes
-rw-r--r--c_compiler/test/ref/SimpleAssignment.s37
-rwxr-xr-xc_compiler/test/ref/SimpleDeclarationbin0 -> 672176 bytes
-rw-r--r--c_compiler/test/ref/SimpleDeclaration.s37
-rwxr-xr-xc_compiler/test/ref/SimpleReturnbin0 -> 672168 bytes
-rw-r--r--c_compiler/test/ref/SimpleReturn.s35
-rwxr-xr-xc_compiler/test/ref/SimpleScopebin0 -> 676264 bytes
-rw-r--r--c_compiler/test/ref/SimpleScope.s39
-rwxr-xr-xc_compiler/test/ref/SimpleShadowingbin0 -> 676268 bytes
-rw-r--r--c_compiler/test/ref/SimpleShadowing.s39
-rwxr-xr-xc_compiler/test/ref/SimpleSubtractionbin0 -> 676272 bytes
-rw-r--r--c_compiler/test/ref/SimpleSubtraction.s43
20 files changed, 419 insertions, 0 deletions
diff --git a/c_compiler/test/ref/ComplexAssignment b/c_compiler/test/ref/ComplexAssignment
new file mode 100755
index 0000000..06111ed
--- /dev/null
+++ b/c_compiler/test/ref/ComplexAssignment
Binary files differ
diff --git a/c_compiler/test/ref/ComplexAssignment.s b/c_compiler/test/ref/ComplexAssignment.s
new file mode 100644
index 0000000..079bb29
--- /dev/null
+++ b/c_compiler/test/ref/ComplexAssignment.s
@@ -0,0 +1,65 @@
+ .file 1 "ComplexAssignment.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,32,$31 # vars= 24, regs= 1/0, args= 0, gp= 0
+ .mask 0x40000000,-4
+ .fmask 0x00000000,0
+ .set noreorder
+ .set nomacro
+ addiu $sp,$sp,-32
+ sw $fp,28($sp)
+ move $fp,$sp
+ li $2,5 # 0x5
+ sw $2,0($fp)
+ li $2,49 # 0x31
+ sw $2,4($fp)
+ li $2,239 # 0xef
+ sw $2,8($fp)
+ li $2,23 # 0x17
+ sw $2,12($fp)
+ li $2,234 # 0xea
+ sw $2,16($fp)
+ li $2,12 # 0xc
+ sw $2,20($fp)
+ lw $2,12($fp)
+ sw $2,0($fp)
+ lw $2,16($fp)
+ sw $2,4($fp)
+ lw $2,16($fp)
+ sw $2,20($fp)
+ lw $2,20($fp)
+ sw $2,0($fp)
+ lw $2,20($fp)
+ sw $2,12($fp)
+ lw $2,12($fp)
+ sw $2,0($fp)
+ lw $2,8($fp)
+ sw $2,20($fp)
+ lw $2,0($fp)
+ sw $2,8($fp)
+ lw $2,16($fp)
+ sw $2,0($fp)
+ lw $2,0($fp)
+ move $sp,$fp
+ lw $fp,28($sp)
+ addiu $sp,$sp,32
+ 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/ScopeWithAdd b/c_compiler/test/ref/ScopeWithAdd
new file mode 100755
index 0000000..51f517d
--- /dev/null
+++ b/c_compiler/test/ref/ScopeWithAdd
Binary files differ
diff --git a/c_compiler/test/ref/ScopeWithAdd.s b/c_compiler/test/ref/ScopeWithAdd.s
new file mode 100644
index 0000000..74b98b0
--- /dev/null
+++ b/c_compiler/test/ref/ScopeWithAdd.s
@@ -0,0 +1,43 @@
+ .file 1 "ScopeWithAdd.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,24,$31 # vars= 16, regs= 1/0, args= 0, gp= 0
+ .mask 0x40000000,-4
+ .fmask 0x00000000,0
+ .set noreorder
+ .set nomacro
+ addiu $sp,$sp,-24
+ sw $fp,20($sp)
+ move $fp,$sp
+ li $2,4 # 0x4
+ sw $2,4($fp)
+ li $2,35 # 0x23
+ sw $2,8($fp)
+ li $2,6 # 0x6
+ sw $2,12($fp)
+ li $2,9 # 0x9
+ sw $2,4($fp)
+ lw $2,4($fp)
+ move $sp,$fp
+ lw $fp,20($sp)
+ addiu $sp,$sp,24
+ 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/SimpleAdd b/c_compiler/test/ref/SimpleAdd
new file mode 100755
index 0000000..726818a
--- /dev/null
+++ b/c_compiler/test/ref/SimpleAdd
Binary files differ
diff --git a/c_compiler/test/ref/SimpleAdd.s b/c_compiler/test/ref/SimpleAdd.s
new file mode 100644
index 0000000..ae0189f
--- /dev/null
+++ b/c_compiler/test/ref/SimpleAdd.s
@@ -0,0 +1,41 @@
+ .file 1 "SimpleAdd.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,68 # 0x44
+ sw $2,0($fp)
+ li $2,38 # 0x26
+ 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
+ .ident "GCC: (Ubuntu 5.4.0-6ubuntu1~16.04.1) 5.4.0 20160609"
diff --git a/c_compiler/test/ref/SimpleAdd_2 b/c_compiler/test/ref/SimpleAdd_2
new file mode 100755
index 0000000..d87e5ec
--- /dev/null
+++ b/c_compiler/test/ref/SimpleAdd_2
Binary files differ
diff --git a/c_compiler/test/ref/SimpleAdd_2.s b/c_compiler/test/ref/SimpleAdd_2.s
new file mode 100644
index 0000000..516f1a2
--- /dev/null
+++ b/c_compiler/test/ref/SimpleAdd_2.s
@@ -0,0 +1,40 @@
+ .file 1 "SimpleAdd_2.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,4 # 0x4
+ sw $2,4($fp)
+ lw $2,4($fp)
+ addiu $2,$2,1
+ 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/SimpleAssignment b/c_compiler/test/ref/SimpleAssignment
new file mode 100755
index 0000000..8b5a267
--- /dev/null
+++ b/c_compiler/test/ref/SimpleAssignment
Binary files differ
diff --git a/c_compiler/test/ref/SimpleAssignment.s b/c_compiler/test/ref/SimpleAssignment.s
new file mode 100644
index 0000000..87ba9db
--- /dev/null
+++ b/c_compiler/test/ref/SimpleAssignment.s
@@ -0,0 +1,37 @@
+ .file 1 "SimpleAssignment.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/SimpleDeclaration b/c_compiler/test/ref/SimpleDeclaration
new file mode 100755
index 0000000..c631eea
--- /dev/null
+++ b/c_compiler/test/ref/SimpleDeclaration
Binary files differ
diff --git a/c_compiler/test/ref/SimpleDeclaration.s b/c_compiler/test/ref/SimpleDeclaration.s
new file mode 100644
index 0000000..943dca7
--- /dev/null
+++ b/c_compiler/test/ref/SimpleDeclaration.s
@@ -0,0 +1,37 @@
+ .file 1 "SimpleDeclaration.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/SimpleReturn b/c_compiler/test/ref/SimpleReturn
new file mode 100755
index 0000000..f7448a9
--- /dev/null
+++ b/c_compiler/test/ref/SimpleReturn
Binary files differ
diff --git a/c_compiler/test/ref/SimpleReturn.s b/c_compiler/test/ref/SimpleReturn.s
new file mode 100644
index 0000000..ce724b2
--- /dev/null
+++ b/c_compiler/test/ref/SimpleReturn.s
@@ -0,0 +1,35 @@
+ .file 1 "SimpleReturn.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,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
+ li $2,13 # 0xd
+ move $sp,$fp
+ lw $fp,4($sp)
+ addiu $sp,$sp,8
+ 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/SimpleScope b/c_compiler/test/ref/SimpleScope
new file mode 100755
index 0000000..bb7927b
--- /dev/null
+++ b/c_compiler/test/ref/SimpleScope
Binary files differ
diff --git a/c_compiler/test/ref/SimpleScope.s b/c_compiler/test/ref/SimpleScope.s
new file mode 100644
index 0000000..ba0c6f9
--- /dev/null
+++ b/c_compiler/test/ref/SimpleScope.s
@@ -0,0 +1,39 @@
+ .file 1 "SimpleScope.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,23 # 0x17
+ sw $2,4($fp)
+ li $2,123 # 0x7b
+ 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/SimpleShadowing b/c_compiler/test/ref/SimpleShadowing
new file mode 100755
index 0000000..c285cff
--- /dev/null
+++ b/c_compiler/test/ref/SimpleShadowing
Binary files differ
diff --git a/c_compiler/test/ref/SimpleShadowing.s b/c_compiler/test/ref/SimpleShadowing.s
new file mode 100644
index 0000000..2b47586
--- /dev/null
+++ b/c_compiler/test/ref/SimpleShadowing.s
@@ -0,0 +1,39 @@
+ .file 1 "SimpleShadowing.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,12 # 0xc
+ sw $2,0($fp)
+ li $2,39 # 0x27
+ sw $2,4($fp)
+ lw $2,0($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/SimpleSubtraction b/c_compiler/test/ref/SimpleSubtraction
new file mode 100755
index 0000000..6436dcd
--- /dev/null
+++ b/c_compiler/test/ref/SimpleSubtraction
Binary files differ
diff --git a/c_compiler/test/ref/SimpleSubtraction.s b/c_compiler/test/ref/SimpleSubtraction.s
new file mode 100644
index 0000000..ca1493f
--- /dev/null
+++ b/c_compiler/test/ref/SimpleSubtraction.s
@@ -0,0 +1,43 @@
+ .file 1 "SimpleSubtraction.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,24,$31 # vars= 16, regs= 1/0, args= 0, gp= 0
+ .mask 0x40000000,-4
+ .fmask 0x00000000,0
+ .set noreorder
+ .set nomacro
+ addiu $sp,$sp,-24
+ sw $fp,20($sp)
+ move $fp,$sp
+ li $2,23 # 0x17
+ sw $2,4($fp)
+ li $2,19 # 0x13
+ sw $2,8($fp)
+ lw $3,4($fp)
+ lw $2,8($fp)
+ subu $2,$3,$2
+ sw $2,12($fp)
+ lw $2,12($fp)
+ move $sp,$fp
+ lw $fp,20($sp)
+ addiu $sp,$sp,24
+ 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"