www.digitalmars.com         C & C++   DMDScript  

D.gnu - [Bug 171] New: 'wrong number of operands' for invlpg inline asm instruction

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

           Summary: 'wrong number of operands' for invlpg inline asm
                    instruction
           Product: GDC
           Version: 0.18
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: glue layer
        AssignedTo: braddr puremagic.com
        ReportedBy: fvbommel wxs.nl


I thought the inline assembler syntax was the same for GDC and DMD?

For this file:

    private void invalidatePage(void* p)
    {
        asm
        {
            mov EAX, [p];
            invlpg [EAX];   // line 6
        }
    }

GDC gives the following error:
test.d:6: wrong number of operands

I use GDC 0.18 (the binary for MinGW GCC 3.4.2 from
http://gdcwin.sourceforge.net/)

This error does not occur when using DMD 0.157 (tried because it's the base for
this GDC version) or 0.159 (the latest).

The command line was
    gdc -c test.d -o test.o -I ..\d\gdc\include\d\3.4.2


-- 
May 31 2006
next sibling parent Thomas Kuehne <thomas-dloop kuehne.cn> writes:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

d-bugmail puremagic.com schrieb am 2006-05-31:
 For this file:

     private void invalidatePage(void* p)
     {
         asm
         {
             mov EAX, [p];
             invlpg [EAX];   // line 6
         }
     }

 GDC gives the following error:
 test.d:6: wrong number of operands

 I use GDC 0.18 (the binary for MinGW GCC 3.4.2 from
 http://gdcwin.sourceforge.net/)

 This error does not occur when using DMD 0.157 (tried because it's the base for
 this GDC version) or 0.159 (the latest).

 The command line was
     gdc -c test.d -o test.o -I ..\d\gdc\include\d\3.4.2
Added to DStress as http://dstress.kuehne.cn/compile/a/asm_invlpg_01_A.d Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFEfss43w+/yD4P9tIRAlr6AKDNylrwjKgvZ8Con+ia/tCdy3YCLACfRDpH aCPzUSP6UczrYfi0xGCtQek= =RkUI -----END PGP SIGNATURE-----
Jun 01 2006
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/bugzilla/show_bug.cgi?id=171


dvdfrdmn users.sf.net changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED





Fixed in SF subversion.  The implementation of the assembler in GDC and DMD is
different, but the syntax should be the same.


-- 
Jun 03 2006