Skip to content

Conversation

@jingfei
Copy link

@jingfei jingfei commented Sep 18, 2015

use recursive to do lab-1 -> fab(x)
another fast version of recursive to do lab-1i -> fab(x,first,second)

@jingfei
Copy link
Author

jingfei commented Sep 18, 2015

change lab-1i to iterative version
and move the old lab-1i to lab-1 (tail recursive version)

change qemu script in Makefile...
* add while loop to run from 1 to 50
* after 47, it exceeds 32-bit integer's range, overflow
* add three more var for calculating the correct answer
* use cut to get the program's output and compare with the correct answer
* if the ans is wrong, it will output the correct answer
My loop start with 3, so there will be a bug if I didn't add exception.
Move lab-1, lab-1i's Makefile to ../make_fib.mk
And include the file
Core registers and AAPCS usage
 * R0 ~ R3: Arguments
 * R4 ~ R8, R10, R11: Variable register
 * R9: Platform register
 * R12: IP (The Intra-Procedure-call scratch register)
 * R13: SP (The Stack Pointer)
 * R14: LR (The Link Register)
 * R15: PC (The Program Counter)
…alysis.

 1. use `make qemu` to analysis, the output is 'analysis.txt'
 2. after arrange the analysis file use gnuplot to generate the chart
    (the command is in 'gplot_cmd.txt' file)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants