what language the clang compiler converts my source code to? and how can i learn that

Hello friends.
I want to learn the assembly that FreeBSD uses
i can use MASM and i can programming with it so i know the assembly base
Does the syntax look like AT&T? like GNU GAS?
 
You can use the -S flag to have it compile to assembler. And you can use different back ends so You can learn different instruction sets. FreeBSD does not only run on only one ISA.
 
i know how to compile C to assembly
i want to learn what assembly clang uses? Suppose I want to develop it.
 
i want to learn what assembly clang uses?
The assembler appropriate for the architecture you're compiling on (excluding cross-compilation for simplicity sake). If you compile on x86-64, you're going to get x86-64 assembler, if you compile for MIPS, you're going to get MIPS assembler. You might be thinking of Java, that compiles to something called "bytecode". The bytecode is then executed in the Java virtual machine. It's the JVM that converts this to code specific for the architecture it runs on.
 
The assembler appropriate for the architecture you're compiling on (excluding cross-compilation for simplicity sake). If you compile on x86-64, you're going to get x86-64 assembler, if you compile for MIPS, you're going to get MIPS assembler. You might be thinking of Java, that compiles to something called "bytecode". The bytecode is then executed in the Java virtual machine. It's the JVM that converts this to code specific for the architecture it runs on.
i want to learn x86_64 in Freebsd
 
There are two targets here:

- LLVM's own machine-independent IR (`clang -S -emit-llvm`)
- actual machine assembler (-S)

You need to decide what you want to look at.
 
Back
Top