qbe

Internal scc patchset buffer for QBE
Log | Files | Refs | README | LICENSE

commit f1b21d145ba03c6052b4b722dc457f8e944e6fca
parent 0956b11331a8c0d5880fff1eb35e8f3ffdc452b8
Author: Quentin Carbonneaux <quentin@c9x.me>
Date:   Mon,  9 Jan 2023 14:05:06 +0100

reorder some sections in doc

Diffstat:
Mdoc/il.txt | 36++++++++++++++++++------------------
1 file changed, 18 insertions(+), 18 deletions(-)

diff --git a/doc/il.txt b/doc/il.txt @@ -712,24 +712,6 @@ towards zero. `loadsw` to make explicit that the extension mechanism used is irrelevant. - * Stack allocation. - - * `alloc4` -- `m(l)` - * `alloc8` -- `m(l)` - * `alloc16` -- `m(l)` - - These instructions allocate a chunk of memory on the - stack. The number ending the instruction name is the - alignment required for the allocated slot. QBE will - make sure that the returned address is a multiple of - that alignment value. - - Stack allocation instructions are used, for example, - when compiling the C local variables, because their - address can be taken. When compiling Fortran, - temporaries can be used directly instead, because - it is illegal to take the address of a variable. - * Blits. * `blit` -- `(m,m,w)` @@ -750,6 +732,24 @@ towards zero. preferable that frontends generate calls to a supporting `memcpy` function. + * Stack allocation. + + * `alloc4` -- `m(l)` + * `alloc8` -- `m(l)` + * `alloc16` -- `m(l)` + + These instructions allocate a chunk of memory on the + stack. The number ending the instruction name is the + alignment required for the allocated slot. QBE will + make sure that the returned address is a multiple of + that alignment value. + + Stack allocation instructions are used, for example, + when compiling the C local variables, because their + address can be taken. When compiling Fortran, + temporaries can be used directly instead, because + it is illegal to take the address of a variable. + The following example makes use of some of the memory instructions. Pointers are stored in long temporaries.