[Issue 6161] New: iasm opcode family Jcc use absolute address instead of relative for functions

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Jun 15 12:08:03 PDT 2011


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 at puremagic.com
        ReportedBy: hughes4 at gmail.com


--- Comment #0 from Shahid <hughes4 at gmail.com> 2011-06-15 12:03:23 PDT ---
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: -------


More information about the Digitalmars-d-bugs mailing list