Subject: gcc inline asm help?
To: None <port-i386@netbsd.org>
From: Jeff Rizzo <riz@tastylime.net>
List: port-i386
Date: 04/13/2005 09:18:51
--YiEDa0DAkWCtVeE4
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Hi-

I'm trying to fix the sysutils/toshutils package for someone without
the benefit of actually having a Toshiba laptop to test things on, and
the issue seems to be in some inline assembly code which is treated
differently in gcc 3.X from gcc 2.95;  this pkg has been broken
for quite a while.  :)

Anyone have a hint how I should, perhaps, patch this?  The error in question
is:

sci.c: In function `SciSupportCheck':
sci.c:91: error: impossible constraint in `asm'
*** Error code 1


...and the code which produces this error is:

        asm ("pushl %%eax\n\t" \
                "pushl %%ebx\n\t" \
                "pushl %%ecx\n\t" \
                "movw $0xf1f1,%%ax\n\t" \
                "movw $0x0000,%%bx\n\t" \
                "movw $0x0000,%%cx\n\t" \
                "inb $0xb2,%%al\n\t" \
                "movb %%ah,%0\n\t" \
                "popl %%ecx\n\t" \
                "popl %%ebx\n\t" \
                "popl %%eax\n" \
                :"=m" (ah) : : "memory" );


Hints gratefully accepted...

Thanks,
+j


--YiEDa0DAkWCtVeE4
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (NetBSD)

iQCVAwUBQl1Ga7OuUtxCgar5AQIADgQAne3D/t9uA51Z6ISPZV652MrgYwHUtGJj
0eahfxqKroeHCsEQgDl7RjbFU5x+FV32Z7ASUvZkX+H58hVOYCS6mYxi8aAWLeDz
mO39k/S+6RMR6XW9zzin4EBU6uBiQ74O4H175ALKsK2VTdW5xsGXUt/pD5GaZZVG
6NPge3HbC8s=
=DlKT
-----END PGP SIGNATURE-----

--YiEDa0DAkWCtVeE4--