Understanding RTL (dumps)
kevin diggs
diggskevin38@gmail.com
Wed Apr 6 18:53:00 GMT 2011
Hi,
Sorry for the noise. I am trying to learn RTL. A simple function's
PowerPC RTL (gcc 3.4.6) has as one of the first RTL expressions:
(insn 3 2 4 (set (mem/f:SI (reg/f:SI 114 virtual-stack-vars) [0 u+0 S4 A32])
(reg:SI 3 3 [ u ])) -1 (nil)
(nil))
>From the gcc-int manual, the first 3 fields (arguments) are:
1) unique id
2) previous instruction chain
3) next instruction chain
The last four are: RTL expression for the side effect (pattern),
instruction code of match (-1 if not yet matched), dependent
instruction list, and note list.
So for this example (which I *think* is putting the register argument
(PowerPC ABI?) on the stack???):
1) 3
2) 2
3) 4
5) (set (mem/f:SI (reg/f:SI 114 virtual-stack-vars) [0 u+0 S4 A32])
(reg:SI 3 3 [u]) )
6) -1
7) (nil)
8) (nil)
I am having trouble reading the pattern (field 5). It is a set:
(set lval x)
Two arguments, in this case the address is a mem:
(mem/f:SI ...)
and the source (x) is a reg:
(reg:SI 3 3 [u])
A mem has two arguments:
(mem:m addr alias)
The addr appears to be a reg but regs only have one argument? What is
"virtual-stack-vars"? Is the stuff in square brackets the alias set?
It's a vector (list?), right?
The 'x' in the set is "(reg:SI 3 3 [u])". What is the second '3' and
the '[u]'???
Thanks!
kevin
P.S.: Almost forgot: what is the '/f'?
More information about the Gcc-help
mailing list