gcc v3.0.1 vs gcc v2.95.3 -- KDE 2.2.1

Giorgos Keramidas charon at labs.gr
Thu Nov 29 01:50:02 EET 2001


On 2001-11-28 15:40:37, Big Lebowski wrote:
>
> Το ερώτημα μου λοιπόν είναι, σε ποιόν από τους δύο πάει η ευθύνη. Στον gcc
> 3.0.1 που δεν παράγει αποτελεσματικά εκτελέσιμα[1], ή στο KDE που δεν έχει
> προσαρμοστεί στην καινούρια έκδοση του gcc.

To FreeBSD team etoimazetai na balei ton GCC 3.x edo kai kairo.  Oi
dokimes omws edeijan oti se orismena pragmata, exei akoma bugs.  Gia
paradeigma, se kommatia kwdika opws:

	void and_set1 (int *x, int *y)
	{
		asm ("andl %0,%1	\n\t"
		    "movl $1,%0		\n",
		    : "=a" (*x), "=b" (*y)
		    : "0" (*x), "1" (*y)
		    : "cc");
	}

Ta constraints "0" .. "9" pou kanoun ta input operands map se kapoio
apo ta registers twn output operands, exoun kapoia psiloproblhmata, me
apotelesma kapou 13-14 arxeia apo to kernel tou FreeBSD na exoun
problhma.  Se kapoia apo auta h lush einai aplh, allazontas ton kwdika
na xrhsimopoiei ta "+x" constraints anti gia "0" .. "9", opote h
parapano function na ginei kapos san:

	void and_set1 (int *x, int *y)
	{
		asm ("andl %0,%1	\n\t"
		    "movl $1,%0		\n",
		    : "+a" (*x), "+b" (*y)
		    : /* mapped to output registers */
		    : "cc");
	}

Alla auto den einai eukolo na ginei pantou, giati se merika shmeia
allazei h ari8mhsh twn operands, kai thelei prosektikes allages ston
kwdika tou asm().  Ki epeita, auto mallon den einai to mono shmeio pou
o GCC 3.x sumperiferetai kapos 'perierga'.

Twra h aporia einai, giati na baleis esu GCC 3.x? :-)

-giorgos

PS: An anarwtiestai ti ejuphretei h function pou xrhsimopoihsa san
    paradeigma, h apanthsh einai panaplh.  SE TIPOTA.  Bouthja to xeri
    sthn apu8mena blammenh fantasia mou, kai thn trabhja apo ena sako
    me malakies.



More information about the Linux-greek-users mailing list