Patchwork [wwwdocs,4.7,AVR,committed] : Mention the new %i asm print modifier

login
register
mail settings
Submitter Georg-Johann Lay
Date June 1, 2012, 9:28 a.m.
Message ID <4FC88B32.6040303@gjlay.de>
Download mbox | patch
Permalink /patch/162288/
State New
Headers show

Comments

Georg-Johann Lay - June 1, 2012, 9:28 a.m.
Yet another new feature in 4.7, committed

Johann

        <li>64-bit integer arithmetic</li>

Patch

Index: changes.html
===================================================================
RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-4.7/changes.html,v
retrieving revision 1.108
diff -u -p -r1.108 changes.html
--- changes.html        21 Apr 2012 00:00:20 -0000      1.108
+++ changes.html        1 Jun 2012 09:15:18 -0000
@@ -676,6 +676,21 @@  int add_values (const __flash int *p, in
     <li>New command-line options <code>-maccumulate-args</code>,
       <code>-mbranch-cost=<i>cost</i></code> and <code>-mstrict-X</code>
       were added to allow better fine-tuning of code optimization.</li>
+    <li>A new inline assembler print modifier <code>%i</code> to print a RAM
address as I/O
+    address has been added:
+
+      <blockquote><pre>
+#include &lt;avr/io.h&gt; /* Port Definitions from AVR-LibC */
+
+void set_portb (uint8_t value)
+{
+    asm volatile ("out %0, %i1" :: "r" (value), "n" (&amp;PORTB) : "memory");
+}</pre></blockquote>
+      The offset between an I/O address and a RAM address for that I/O
+      location is device-specific.  This offset is taken into account when
+      printing a RAM address with the <code>%i</code> modifier so that the
+      address is suitable to be used as operand in an I/O command.
+      The address must be a constant integer known at compile time.</li>
     <li>Many optimizations to:
       <ul>