From f1b21d145ba03c6052b4b722dc457f8e944e6fca Mon Sep 17 00:00:00 2001 From: Quentin Carbonneaux Date: Mon, 9 Jan 2023 14:05:06 +0100 Subject: reorder some sections in doc --- doc/il.txt | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/doc/il.txt b/doc/il.txt index 857050f..cc3e021 100644 --- 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. -- cgit 1.4.1