www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 6161] New: iasm opcode family Jcc use absolute address instead of relative for functions

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=6161

           Summary: iasm opcode family Jcc use absolute address instead of
                    relative for functions
           Product: D
           Version: D2
          Platform: x86_64
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: hughes4 gmail.com



I would like some clarification for the following code:
//-----
module test;
void main() { asm
{
    naked;
    jz Target;
}}
void Target() { asm
{
    naked;
    inc EAX;
    ret;
}}
//-----

Looking at "objdump -drM intel test":

4177fc:    0f 84 04 78 41 00    je   82f006 <_end+0x1f7966>

The absolute value is being used instead of the relative address, I believe the
correct output should be:

4177fc:    0f 84 02 00 00 00    je   417804 <_D4test6TargetFZi>

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jun 15 2011
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=6161


Walter Bright <bugzilla digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |bugzilla digitalmars.com
         Resolution|                            |FIXED



21:31:10 PDT ---
https://github.com/D-Programming-Language/dmd/commit/62b6c07f34598c50acb20e7436cbe7291f97d35e

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jun 26 2011