public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c/2804: [*not*] regression from 2.95.3
@ 2001-12-11 23:56 rodrigc
  0 siblings, 0 replies; 3+ messages in thread
From: rodrigc @ 2001-12-11 23:56 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR c/2804; it has been noted by GNATS.

From: rodrigc@gcc.gnu.org
To: etienne.lorrain@masroudeau.com, gcc-bugs@gcc.gnu.org,
  gcc-gnats@gcc.gnu.org, gcc-prs@gcc.gnu.org, nobody@gcc.gnu.org
Cc:  
Subject: Re: c/2804: [*not*] regression from 2.95.3
Date: 12 Dec 2001 07:53:16 -0000

 Synopsis: [*not*] regression from 2.95.3
 
 State-Changed-From-To: analyzed->closed
 State-Changed-By: rodrigc
 State-Changed-When: Tue Dec 11 23:53:16 2001
 State-Changed-Why:
     Fixed in gcc 3.0.3.
     
     Compiling this testcase results in the compilation error:
     q.c: In function `EGA_setpixel':
     q.c:58: invalid `asm': operand is neither a constant nor a condition code, invalid operand code 'c'
     q.c:66: invalid `asm': operand is neither a constant nor a condition code, invalid operand code 'c'
 
 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&pr=2804&database=gcc


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: c/2804: [*not*] regression from 2.95.3
@ 2001-12-12  3:56 Etienne Lorrain
  0 siblings, 0 replies; 3+ messages in thread
From: Etienne Lorrain @ 2001-12-12  3:56 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR c/2804; it has been noted by GNATS.

From: Etienne Lorrain <etienne@masroudeau.com>
To: <rodrigc@gcc.gnu.org>
Cc: <gcc-bugs@gcc.gnu.org>, <gcc-gnats@gcc.gnu.org>, <gcc-prs@gcc.gnu.org>,
        <nobody@gcc.gnu.org>
Subject: Re: c/2804: [*not*] regression from 2.95.3
Date: Wed, 12 Dec 2001 03:46:23 -0800 (PST)

 On 12 Dec 2001 rodrigc@gcc.gnu.org wrote:
 
 > Synopsis: [*not*] regression from 2.95.3
 >
 > State-Changed-From-To: analyzed->closed
 > State-Changed-Why:
 >     Fixed in gcc 3.0.3.
 >
 >     Compiling this testcase results in the compilation error:
 >     q.c: In function `EGA_setpixel':
 >     q.c:58: invalid `asm': operand is neither a constant nor a condition code, invalid operand code 'c'
 >     q.c:66: invalid `asm': operand is neither a constant nor a condition code, invalid operand code 'c'
 >
 > http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&pr=2804&database=gcc
 >
 
   Hello,
 
  First thanks to the guy who removed the "Internal error: Segmentation
 fault" and for your time to re-test it. The main problem is solved.
 
  One thing I have to say is that what I want to do is still not possible.
 The target is to access the content of an address in the %gs segment,
 setting a minimum of constraint to the way it is accessed, so:
    movzbl %%gs:(3),%0
    movzbl %%gs:(%%eax),%0
 should be possible. My %%gs points to the graphic memory, so sometimes
 the compiler can optimise the address up to a know constant.
 
  First, up to now (I have to recheck with gcc 3.0.3), a "%c1" means
 "if it is constant, do not put the constant prefix, if it is not
 a constant, treat it like %1". In the gpeekb() inline function,
 I do not have a clue whether %1 is constant or not.
 
  A better way to write the gpeekb would be using:
   asm (" movzbl %%gs:%a1,%0 "
 	: "=r" (returned)
 	: "g" (offset), "m" (*video_memory)
 	);
  But that does not compile neither (not in all cases). This would
 enable the compiler to generate:
    movzbl %%gs:(%%eax,%%ecx,2),%0
 if he needs to.
 
  Because I am accessing video memory, I would like to have quite
 efficient code... Right now I am using:
   asm (" movzbl %%gs:%a1,%0 "
 	: "=r" (returned)
 	: "r" (offset), "m" (*video_memory)
 	);
 so force the offset in a register. I also tried to use
  if(__builtin_constant_p (offset))
 but there is warnings at the asm() because the operands will
 probably not fit their constraint...
 
  Note that the perfect solution would probably be:
 unsigned char graphic_pixel[640*480] __attribute__ ((segment (gs)));
 unsigned *pixel32ptr __attribute__ ((segment (gs)));
  but I understand this is quite complex to implement.
 
   Thanks for reading,
   Etienne.
 


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: c/2804: [*not*] regression from 2.95.3
@ 2001-12-11 23:53 rodrigc
  0 siblings, 0 replies; 3+ messages in thread
From: rodrigc @ 2001-12-11 23:53 UTC (permalink / raw)
  To: etienne.lorrain, gcc-bugs, gcc-gnats, gcc-prs, nobody

Synopsis: [*not*] regression from 2.95.3

State-Changed-From-To: analyzed->closed
State-Changed-By: rodrigc
State-Changed-When: Tue Dec 11 23:53:16 2001
State-Changed-Why:
    Fixed in gcc 3.0.3.
    
    Compiling this testcase results in the compilation error:
    q.c: In function `EGA_setpixel':
    q.c:58: invalid `asm': operand is neither a constant nor a condition code, invalid operand code 'c'
    q.c:66: invalid `asm': operand is neither a constant nor a condition code, invalid operand code 'c'

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&pr=2804&database=gcc


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2001-12-12 11:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-12-11 23:56 c/2804: [*not*] regression from 2.95.3 rodrigc
  -- strict thread matches above, loose matches on Subject: below --
2001-12-12  3:56 Etienne Lorrain
2001-12-11 23:53 rodrigc

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).