author | pcpa <paulo.cesar.pereira.de.andrade@gmail.com> | 2013年02月19日 22:10:35 -0300 |
---|---|---|
committer | pcpa <paulo.cesar.pereira.de.andrade@gmail.com> | 2013年02月19日 22:10:35 -0300 |
commit | 678e72484c859c3f740c7723da55a8fc90654f99 (patch) | |
tree | 56eaa1e1439e8f51c5788d16d90dd1394d5465e2 | |
parent | e6a14a61eb08e8446c0b81212d88011ddd009bf4 (diff) | |
download | lightning-678e72484c859c3f740c7723da55a8fc90654f99.tar.gz |
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | doc/body.texi | 19 |
@@ -1,5 +1,9 @@ 2013年02月19日 Paulo Andrade <pcpa@gnu.org> + * doc/body.texi: Add back the SPARC code generation example. + +2013年02月19日 Paulo Andrade <pcpa@gnu.org> + * check/lightning.c: Remove state flag to work with partial sparc port, by just disassembling if there was incomplete code generation. diff --git a/doc/body.texi b/doc/body.texi index 3eef13b..7d3099d 100644 --- a/doc/body.texi +++ b/doc/body.texi @@ -710,11 +710,28 @@ code for these instructions. The client program has the responsibility of describing the code to be generated using the standard @lightning{} instruction set. -Let's examine the code generated for @code{incr} on the x86_64 +Let's examine the code generated for @code{incr} on the SPARC and x86_64 architecture (on the right is the code that an assembly-language programmer would write): @table @b +@item SPARC +@example + save %sp, -112, %sp + mov %i0, %g2 ret + inc %g2 inc %i0 + mov %g2, %i0 + restore + retl + nop +@end example +In this case, @lightning{} introduces overhead to create a register +window (not knowing that the procedure is a leaf procedure) and to +move the argument to the general purpose register @code{R0} (which +maps to @code{%g2} on the SPARC). +@end table + +@table @b @item x86_64 @example sub 0ドルx30,%rsp |