Commits

Peter Shook  committed a52a28d

echo offset to stderr for checking

  • Participants
  • Parent commits c62fad2

Comments (0)

Files changed (1)

File regcodegen.pl

         my $id = $regi->id();
         my $space = ' ' x max(0, 26 - length($id));
         my $name = $regi->name();
-        if ($regi->offset() > $next_offset)
+        my $offset = $regi->offset();
+        printf STDERR "0x%x\t$id$space\t$name\n", $offset;
+        if ($offset > $next_offset)
         {
-            my $padding = $regi->offset() - $next_offset;
+            my $padding = $offset - $next_offset;
             print <<"___";
     uint8_t pad${padi}[${padding}];
 
         print <<"___";
     uint${width}_t    ${id}; ${space}/* ${name} */
 ___
-        $next_offset = $regi->offset() + $regi->regsize();
+        $next_offset = $offset + $regi->regsize();
     }
     print <<"___";
 } __attribute__ ((__packed__));