Assembly class HERE
Posted: Sat May 21, 2016 10:26 pm
Hello
I'm opening this topic for teaching Epiphany assembly - interfaced to C - to whoever wants.
Teaching and being teached: I am a beginner too, and there are lots of questions I still cannot answer.
I think teaching will help me reinforce my learning and may help a few others, hopefully.
I intend to start next week.
The subject is "writing recursive functions in assembly".
OK I know... some of you already whisper, that's two hard problems...
I agree, you'd better NOT begin with this topic
As Andreas said, and I for the most part agree: there are lots of high quality assembly code in the Parallella examples.
I particularly appreciated e_fft_asm.S... so have a nice reading and you're welcome any time.
Why or when should we write in assembly ?
Apart from speed concerns: no way, it's not productive, not portable, not readable, etc.
Speed... when I bought the Parallella I had just speed (per watt) as expectation.
So if I can cut down the execution time by 10 %, I'm in.
The fact is, the assembly version we'll see next week is about 25 % smaller than the C compiler's output.
And I am quite convinced everybody should "think assembly" at least once to improve its C source code:
looking at the C compiler's output helps you reorganize data more efficiently or find out where it is not optimal yet (it's a robust but young compiler).
Look at __builtin_ctz output for example, or think about a 64-bit addition.
That's why I'm opening a second topic, let's call it "Assembly snippets".
It may give hints for the compiler guys, or we can simply integrate these snippets into our own source files.
Homework for next week:
- read the docs if not done - especially the instruction set in the architecture reference on
Recommended: install esdk 2015.1 on your regular computer if possible (Linux x86-64 esdk for example) - even if it's several hours to get it,
you'll get nice tools to debug things faster than on the Parallella itself.
The esdk doc is fairly good.
I'm opening this topic for teaching Epiphany assembly - interfaced to C - to whoever wants.
Teaching and being teached: I am a beginner too, and there are lots of questions I still cannot answer.
I think teaching will help me reinforce my learning and may help a few others, hopefully.
I intend to start next week.
The subject is "writing recursive functions in assembly".
OK I know... some of you already whisper, that's two hard problems...
I agree, you'd better NOT begin with this topic
As Andreas said, and I for the most part agree: there are lots of high quality assembly code in the Parallella examples.
I particularly appreciated e_fft_asm.S... so have a nice reading and you're welcome any time.
Why or when should we write in assembly ?
Apart from speed concerns: no way, it's not productive, not portable, not readable, etc.
Speed... when I bought the Parallella I had just speed (per watt) as expectation.
So if I can cut down the execution time by 10 %, I'm in.
The fact is, the assembly version we'll see next week is about 25 % smaller than the C compiler's output.
And I am quite convinced everybody should "think assembly" at least once to improve its C source code:
looking at the C compiler's output helps you reorganize data more efficiently or find out where it is not optimal yet (it's a robust but young compiler).
Look at __builtin_ctz output for example, or think about a 64-bit addition.
That's why I'm opening a second topic, let's call it "Assembly snippets".
It may give hints for the compiler guys, or we can simply integrate these snippets into our own source files.
Homework for next week:
- read the docs if not done - especially the instruction set in the architecture reference on
Recommended: install esdk 2015.1 on your regular computer if possible (Linux x86-64 esdk for example) - even if it's several hours to get it,
you'll get nice tools to debug things faster than on the Parallella itself.
The esdk doc is fairly good.