5. C to Assembly

preview_player
Показать описание
MIT 6.172 Performance Engineering of Software Systems, Fall 2018
Instructor: Tao B. Schardl

This lecture focuses on how C code is implemented in x86-64 assembly. Dr. Schardl reasons through the mapping from C code to assembly in two steps: C to LLVM IR and then LLVM IR to Assembly.

License: Creative Commons BY-NC-SA
Рекомендации по теме
Комментарии
Автор

*My takeaways:*
1. How does C code become assembly 5:20
2. LLVM IR primer 10:25
3. C to LLVM IR 19:45
4. LLVM IR to assembly 48:18
5. Case study 1:07:42

leixun
Автор

Nice to have a look on the intermediary LLVM output files and the way compilers do their work.

klausehrhardt
Автор

Amish man is my new favorite instructor right now <3

byarkan
Автор

MIT logóre nézve megijedtem és hírtelen a BME MIT jutott eszembe. A mai napig PTSD-m van tőle :D

norbi
Автор

The only assembly language I can read are IKEA instructions.

SuperlativeCG
Автор

Brilliant simple straight forward explanation. Why does everyone else make this seem complicated????

davereid-daly
Автор

In the final example of fib, under LBB0_1,
we calculate (n-1) as leaq -1(%rbx), %rdi
but calculate (n2) in 2 steps.
Why did we do so?

raghav
Автор

I would appreciate a Holy C to assembly course.

pythontron
Автор

I wonder why in llvm ir representation of mm_base function on 25:22 parameters A and B marked as readonly. They'd better be preceded by a const keyword.

richardhelper
Автор

At 1:18:26, why did it use leaq to calculate n-1, but movq and addq to compute n-2? Why not again use leaq -2(%rbx), %rdi to compute n-2?

StephenCameron
Автор

@16:44 it might just be the network security guy in me but when I saw ICMP I thought of something other than Boolean logic LOL. How confusing.

CaseyAnthonyVEVO
Автор

Much of india dudes in lecture. Seems to be the same anywhere in that sort of lectures :D
After watching 5min of that video i remembered why i changed the subject from embedded systems to electrical engineering xD

TB-jlfr
Автор

im just looking at these and am completely clueless as to what is going on.... is there anyway to get used to RISC-V architecture??

hothead
Автор

you. in the background. with the squeaky chair: I don't know who you are. I don't know what you want. If you are looking for ransom I can tell you I don't have money, but what I do have are a very particular set of skills. Skills I have acquired over a very long career. Skills that make me a nightmare for people like you.

sethtrowbridge
Автор

The shape of the greek letter phi looks like the graph with lots of loops.

luserdroog
Автор

@9:34 "Primer" is not pronounced "prim-mer" if it were then it would be written "primmer". It is "prime-er" as in "priming" you for something.

banalestorchid
Автор

Congrats for the class !! How can I implement the C operation (x % y) in Assembly ?

fabiobairros
Автор

Love this open courseware, truly thank you... but as an aside, I don't think we need to donate to a school with a $23.5 billion endowment.

darkwoodmovies
Автор

One of the students asks why is C called 'C'... and the instructor didn't know.
C language is called 'C' because C comes after 'B'. C was derived from and an improvement over an earlier programming language called 'B'. Nothing mysterious or philosophical was involved in naming it.

deanlhouston
Автор

I thought it would be C to Assembly, not C to LLVM.

marcioaso