[2/2] gas/doc: expand explanation of AVR pm_* modifiers

Message ID 20200607033903.460166-2-snth@snthhacks.com
State New
Headers show
Series
  • [1/2] gas/doc: improve AVR modifiers wording
Related show

Commit Message

Seth Girvan June 7, 2020, 3:39 a.m.
This patch is to clarify when to use the pm_lo8, pm_hi8, etc symbol
modifiers versus the lo8, hi8, etc modifiers.
---
 gas/doc/c-avr.texi | 17 +++++++++++++----
 1 file changed, 13 insertions(+), 4 deletions(-)

-- 
2.26.2

Patch

diff --git a/gas/doc/c-avr.texi b/gas/doc/c-avr.texi
index db7202a0c6..2a1000b271 100644
--- a/gas/doc/c-avr.texi
+++ b/gas/doc/c-avr.texi
@@ -277,22 +277,31 @@  ldi r29, hhi8(285774925)
 This modifier allows you to use bits 0 through 7 of
 an address expression as an 8 bit relocatable expression.
 This modifier is useful for addressing data or code from
-Flash/Program memory. The use of @samp{pm_lo8} is similar
-to @samp{lo8}.
+Flash/Program memory by two-byte words. The use of @samp{pm_lo8}
+is similar to @samp{lo8}.
 
 @item pm_hi8
 
 This modifier allows you to use bits 8 through 15 of
 an address expression as an 8 bit relocatable expression.
 This modifier is useful for addressing data or code from
-Flash/Program memory.
+Flash/Program memory by two-byte words.
+
+For example, when setting the AVR @samp{Z} register with the @samp{ldi}
+instruction for subsequent use by the @samp{ijmp} instruction:
+
+@smallexample
+ldi r30, pm_lo8(sym)
+ldi r31, pm_hi8(sym)
+ijmp
+@end smallexample
 
 @item pm_hh8
 
 This modifier allows you to use bits 15 through 23 of
 an address expression as an 8 bit relocatable expression.
 This modifier is useful for addressing data or code from
-Flash/Program memory.
+Flash/Program memory by two-byte words.
 
 @end table