It is possible to output assembler code with TCC?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

It is possible to output assembler code with TCC?

tinycc-devel mailing list
I want to see if using the register keyword a particular variable value goes into a register.
In the online documentation I read that you can output object code, but I did not saw if assembler code can be generated.
If assembler code can not be generated with TCC, how can I check if a variable value goes into a general purpose register?
Maybe output object code and disassemble it?

Thank you,
Zsolt

_______________________________________________
Tinycc-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel
Reply | Threaded
Open this post in threaded view
|

Re: It is possible to output assembler code with TCC?

Barath Aron
Yes. There are a lot of tools to disassemble the output. "objdump" works
on almost Linux distros and even on windoz via mingw or msys or cygwin.
TCC has an internal assembler and linker.

tcc -c stuff.c && objdump -D stuff.o

Aron


On 7/25/19 3:16 PM, Zsolt Kántor via Tinycc-devel wrote:

> I want to see if using the register keyword a particular variable value goes into a register.
> In the online documentation I read that you can output object code, but I did not saw if assembler code can be generated.
> If assembler code can not be generated with TCC, how can I check if a variable value goes into a general purpose register?
> Maybe output object code and disassemble it?
>
> Thank you,
> Zsolt
>
> _______________________________________________
> Tinycc-devel mailing list
> [hidden email]
> https://lists.nongnu.org/mailman/listinfo/tinycc-devel


_______________________________________________
Tinycc-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel