Add updated sparc example from lightning 1.2c documentation. - lightning.git - Portable just-in-time compiler library

index : lightning.git
Portable just-in-time compiler library
summary refs log tree commit diff
diff options
context:
space:
mode:
authorpcpa <paulo.cesar.pereira.de.andrade@gmail.com>2013年02月19日 22:10:35 -0300
committerpcpa <paulo.cesar.pereira.de.andrade@gmail.com>2013年02月19日 22:10:35 -0300
commit678e72484c859c3f740c7723da55a8fc90654f99 (patch)
tree56eaa1e1439e8f51c5788d16d90dd1394d5465e2
parente6a14a61eb08e8446c0b81212d88011ddd009bf4 (diff)
downloadlightning-678e72484c859c3f740c7723da55a8fc90654f99.tar.gz
Add updated sparc example from lightning 1.2c documentation.
* doc/body.texi: Add back the SPARC code generation example.
Diffstat
-rw-r--r--ChangeLog 4
-rw-r--r--doc/body.texi 19
2 files changed, 22 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 56ecbd0..0d6007f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
generated by cgit v1.2.3 (git 2.39.1) at 2025年09月23日 09:07:41 +0000

AltStyle によって変換されたページ (->オリジナル) /