Skip to content

jingfei/arm-lecture

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lab-1

Here are three different version...

  1. recursion: Use make command to check the answer
  2. iteration: Use make command to check the answer
  3. c-code: Translate arm code to c, and use gprof to analyze. You can use make to run the gprof script, the results will show in analysis.txt. After arranging the data, you can see the example in result.txt. Finally, I use the script and the result shows as following...
gnuplot
> plot "analysis-result.txt"
> set style data lines                                           # connect each dots
> set grid                                                       # set background as grid
> set title "fib efficiency"                                     # add title
> replot
> plot "analysis-result.txt" using 1:2 title 'Recursion', \
       "analysis-result.txt" using 1:3 title 'Tail-Recursion', \    
       "analysis-result.txt" using 1:4 title 'Iteration'         # plot three data at the same time
> set logscale y; replot                                         # data in y-axis is large, use logscale
> set output "efficiency.png" ; set term png ; replot

picture alt

About

ARM programs to illustrate tutorials

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 46.3%
  • Makefile 32.3%
  • Assembly 20.9%
  • Shell 0.5%