[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Tinycc-devel] emulate tcc -S - was (no subject)
From: |
Christian Jullien |
Subject: |
Re: [Tinycc-devel] emulate tcc -S - was (no subject) |
Date: |
Mon, 28 Feb 2022 06:29:55 +0100 |
Hi, if available on your system (linux and alt.) objdump -d is your friend:
cat foo.c && tcc -c foo.c && objdump -d foo.o
int
imax(int i, int j) {
return (i > j) ? i : j;
}
foo.o: file format elf32-littlearm
Disassembly of section .text:
00000000 <imax>:
0: e1a0c00d mov ip, sp
4: e92d0003 push {r0, r1}
8: e92d5800 push {fp, ip, lr}
c: e1a0b00d mov fp, sp
10: e1a00000 nop ; (mov r0, r0)
14: e59b000c ldr r0, [fp, #12]
18: e59b1010 ldr r1, [fp, #16]
1c: e1500001 cmp r0, r1
20: da000000 ble 28 <imax+0x28>
24: ea000001 b 30 <imax+0x30>
28: e59b0010 ldr r0, [fp, #16]
2c: ea000000 b 34 <imax+0x34>
30: e59b000c ldr r0, [fp, #12]
34: e89ba800 ldm fp, {fp, sp, pc}
-----Original Message-----
From: Tinycc-devel [mailto:tinycc-devel-bounces+eligis=orange.fr@nongnu.org] On
Behalf Of Ivo van Poorten
Sent: Sunday, February 27, 2022 18:49
To: tinycc-devel@nongnu.org
Subject: Re: [Tinycc-devel] (no subject)
TCC generates object code directly. There is no assembly intermediate
step, hence tcc -S does not work.
On Sat, 26 Feb 2022 21:14:49 -0500 Yair Lenga
<yair.lenga@gmail.com> wrote:
> I'm interested in understanding the code generation logic of tcc.
>
> Is there away to see the intermediate representation that tcc
> generates between the "C" source code, and the object file.
> documentation indicates there tcc can compile assembly source code to
> object, but I could not not find the equivalent of "gcc -S", which
> should convert the "C" code into assembly.
>
> Yair
_______________________________________________
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [Tinycc-devel] emulate tcc -S - was (no subject),
Christian Jullien <=