Article View: dnet.comp.pcs
Article #150Lang keinen cc Bug mehr gehabt
From: Helmut Knirsch
Date: Fri, 25 May 1990 12:16
Date: Fri, 25 May 1990 12:16
115 lines
3775 bytes
3775 bytes
Es waere schoen wenn bei PCS jemand sagen koennte, welche Konstrukte
zu meiden sind, um die folgende compiler generierte Endlosschleife
zu umgehen :-)
Der folgende Abschnitt ist aus X11/lib/Xmu/Lower.c:
=====================================================================
1 #define XK_LATIN1
2 #include <X11/keysymdef.h>
3
4 /*
5 * ISO Latin-1 case conversion routine
6 */
7
8 void
9 XmuCopyISOLatin1Lowered(dst, src)
10 char *dst, *src;
11 {
12 register unsigned char *dest, *source;
13
14 for (dest = (unsigned char *)dst, source = (unsigned char *)src;
15 *source;
16 *source++, *dest++)
17 {
18 if ((*source >= XK_A) && (*source <= XK_Z))
19 *dest = *source + (XK_a - XK_A);
20 else if ((*source >= XK_Agrave) && (*source <= XK_Odiaeresis))
21 *dest = *source + (XK_agrave - XK_Agrave);
22 else if ((*source >= XK_Ooblique) && (*source <= XK_Thorn))
23 *dest = *source + (XK_oslash - XK_Ooblique);
24 else
25 *dest = *source;
26 }
27 *dest = '\0';
28 }
=====================================================================
Die Zeile 16 wird aber vom cc leider nicht beruecksichtigt, denn sonst
waere in der Naehe von L19 etwas wie movb a4@+,d1 movb a5@+,d2 zu finden.
der cc (V.3.2/M-V.3.2Ab) aber macht daraus :
=====================================================================
.text
.even
.globl _XmuCopyISOLatin1Lowered
_XmuCopyISOLatin1Lowered:
link a6,#L10000 | 0: 4e5600009ffc00000000
moveml #M10001,a6@(-28) | a: 48ee38e0ffe4
fmovem.x #0xe0 -> a7@- | 10: f227e0e0
|line 33
movl a6@(8),a5 | 14: 2a6e0008
movl a6@(12),a4 | 18: 286e000c
bra L16 | 1c: 4e714ef900000000
L17:
|line 36
cmpb #65,a4@ | 24: 0c140041
bcs L18 | 28: 64064ef900000000
cmpb #90,a4@ | 30: 0c14005a
bhi L18 | 34: 63064ef900000000
|line 37
clrl d1 | 3c: 4281
movb a4@,d1 | 3e: 1214
addl #32,d1 | 40: 068100000020
movb d1,a5@ | 46: 1a81
bra L19 | 48: 4e714ef900000000
L18:
|line 38
cmpb #192,a4@ | 50: 0c1400c0
bcs L20 | 54: 64064ef900000000
cmpb #214,a4@ | 5c: 0c1400d6
bhi L20 | 60: 63064ef900000000
|line 39
clrl d1 | 68: 4281
movb a4@,d1 | 6a: 1214
addl #32,d1 | 6c: 068100000020
movb d1,a5@ | 72: 1a81
bra L21 | 74: 4e714ef900000000
L20:
|line 40
cmpb #216,a4@ | 7c: 0c1400d8
bcs L22 | 80: 64064ef900000000
cmpb #222,a4@ | 88: 0c1400de
bhi L22 | 8c: 63064ef900000000
|line 41
clrl d1 | 94: 4281
movb a4@,d1 | 96: 1214
addl #32,d1 | 98: 068100000020
movb d1,a5@ | 9e: 1a81
bra L23 | a0: 4e714ef900000000
L22:
|line 43
movb a4@,a5@ | a8: 1a94
L23:
L21:
L19:
|line 44
L16:
|line 44
tstb a4@ | aa: 4a14
bne L17 | ac: 67064ef900000000
L15:
|line 45
clrb a5@ | b4: 4215
L13:
moveml a6@(-28),#M10001 | b6: 4cee3000ffe4
unlk a6 | bc: 4e5e
rts | be: 4e75
L10000=-28
M10001=0x3000
F10001=0x0
.data
.even
.even
.even
=====================================================================
Technical Details
Message-ID:
<1096@knirsh.UUCP>Path:
arc1-ca.pugleaf.net!gmdzi!unido!knirsh!helmutShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1354df,d1ca64a0214bd108,start X-Google-Attributes: gid1354df,public X-Google-ArrivalTime: 1990-05-25 10:10:15 PST Path: arc1-ca.pugleaf.net!gmdzi!unido!knirsh!helmut From: helmut@knirsh.UUCP (Helmut Knirsch) Newsgroups: dnet.comp.pcs Subject: Lang keinen cc Bug mehr gehabt Message-ID: <1096@knirsh.UUCP> Date: 25 May 90 12:16:59 GMT Distribution: dnet Organization: Knirsch, Softwareentwicklung, 5650 Solingen 11, W-Germany Lines: 115 Posted: Fri May 25 13:16:59 1990