The final resolution of this issue has been determined, and the assembly
operands 
page<https://sourceforge.net/apps/mediawiki/mspgcc/index.php?title=Gcc46:Symbolic>on
the wiki updated with explanations and demonstrations.  The summary is
replicated below for your convenience.

This is the best I can do preserving existing behavior while removing
inconsistencies and enhancing capabilities.  The impact on existing code
should be minimal.  Personally, I'm quite pleased with how it turned out.

Peter

In short:
* Commonly used and documented-as-working idioms are unchanged.
* Inconsistencies in documented-as-working idioms are corrected.
* Inconsistencies in unusual cases are eliminated.
* <tt>$</tt> is now recognized as the program location counter (normally
<tt>.</tt> "dot" in GNU assembler) in all expressions, not just jump
operands.
* PC-relative values may be obtained in several situations by a new idiom.

=== Jump instructions ===
* Jumps with negative immediate values are now linear with the non-negative
ones: i.e., where <tt>jmp -4</tt> was formerly equivalent to <tt>jmp
$-4</tt> it is now equivalent to <tt>jmp $-2</tt>.
* <tt>jmp $+0</tt> no longer assembles to the same thing as <tt>jmp
$+2</tt>.
* All other jump operands processing is unchanged.

=== Operands ===
* Symbolic mode <tt>mov expr, r15</tt> is now distinguished from indexed
mode <tt>mov expr(r0), r15</tt>, with the former equivalent to <tt>mov
expr-.(r0), r15</tt>.
* It is now possible to express a PC-relative operand using a link-time
determined offset that is not adjusted based on the instruction, making
<tt>expr(r0)</tt> the same as any other indexed operand.
* Disassembly of instructions that originally were symbolic operands is now
explicitly the indexed form, ensuring that re-assembly will produce the
same instruction.

=== <tt>.</tt> (dot) and <tt>$</tt> ===
* The syntax <tt>expr-.</tt> denotes a PC-relative offset; expr may be a
constant, label, or symbol.
* PC-relative offsets are supported for all operand contexts as long as the
value of the expression can be determined at assembly time.
* PC-relative offset expressions that involve a relocation are currently
supported only for operands that are inherently PC-relative (jump
instructions, and indexed <tt>r0</tt>).
------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Mspgcc-users mailing list
Mspgcc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mspgcc-users

Reply via email to