Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cMIPS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Harbor Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Roberto Hexsel
cMIPS
Commits
ed8eb887
Commit
ed8eb887
authored
8 years ago
by
Roberto Hexsel
Browse files
Options
Downloads
Patches
Plain Diff
fix to count.expected
parent
b3ac909c
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
cMIPS/tests/count.c
+3
-3
3 additions, 3 deletions
cMIPS/tests/count.c
cMIPS/tests/count.expected
+1
-0
1 addition, 0 deletions
cMIPS/tests/count.expected
with
4 additions
and
3 deletions
cMIPS/tests/count.c
+
3
−
3
View file @
ed8eb887
//-------------------------------------------------------------------------
//-------------------------------------------------------------------------
// test if COUNT register counts up monotonically
as it should
// test if COUNT register counts up monotonically
// returns error if the time to compute every 11th element of the Fibonacci
// returns error if the time to compute every 11th element of the Fibonacci
// sequence, as measured by COUNT is not monotonically increasing
// sequence, as measured by COUNT is not monotonically increasing
//-------------------------------------------------------------------------
//-------------------------------------------------------------------------
...
@@ -51,17 +51,17 @@ int main() {
...
@@ -51,17 +51,17 @@ int main() {
// print(new);
// print(new);
to_stdout
(
'o'
);
to_stdout
(
'k'
);
to_stdout
(
'\n'
);
to_stdout
(
'o'
);
to_stdout
(
'k'
);
to_stdout
(
'\n'
);
to_stdout
(
'\n'
);
// separate tests
// now disable COUNT and make sure that it has stopped
// now disable COUNT and make sure that it has stopped
print
(
stopCount
()
);
// stop COUNT
print
(
stopCount
()
);
// stop COUNT
old
=
readCount
();
// COUNT before computing fib(i)
old
=
readCount
();
// COUNT before computing fib(i)
print
(
fibonacci
(
5
)
);
print
(
fibonacci
(
5
)
);
new
=
readCount
();
// COUNT after computing fib(i)
new
=
readCount
();
// COUNT after computing fib(i)
monotonic
=
monotonic
&&
(
(
new
-
old
)
>
0
);
monotonic
=
monotonic
&&
(
(
new
-
old
)
>
0
);
if
(
monotonic
==
TRUE
)
{
if
(
monotonic
==
TRUE
)
{
to_stdout
(
'e'
);
to_stdout
(
'r'
);
to_stdout
(
'r'
);
to_stdout
(
'\n'
);
to_stdout
(
'e'
);
to_stdout
(
'r'
);
to_stdout
(
'r'
);
to_stdout
(
'\n'
);
print
(
new
);
print
(
new
);
exit
(
new
);
}
else
{
}
else
{
// print(new);
// print(new);
to_stdout
(
'o'
);
to_stdout
(
'k'
);
to_stdout
(
'\n'
);
to_stdout
(
'o'
);
to_stdout
(
'k'
);
to_stdout
(
'\n'
);
...
...
This diff is collapsed.
Click to expand it.
cMIPS/tests/count.expected
+
1
−
0
View file @
ed8eb887
...
@@ -4,6 +4,7 @@
...
@@ -4,6 +4,7 @@
0000452f
0000452f
0035c7e2
0035c7e2
ok
ok
0880007c
0880007c
00000005
00000005
ok
ok
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment