|
|
1.1 root 1: //////////
2: / n1/i386/tables/aft.t
3: //////////
4:
5: /////////
6: /
7: / Postfix increment and decrement (@++, @--).
8: / The PTX case, which does these operations on pointers,
9: / must handle anything on the right hand side.
10: / The other cases must only handle a 1.
11: / OP0 is ADD or SUB, OP1 is INC or DEC; cf. n1/i386/table1.c/optab[].
12: / For the TL OP1 implementation, cf. n1/i386/outmch.c/maptype().
13: /
14: /////////
15:
16: INCAFT:
17: DECAFT:
18:
19: / Integer or pointer.
20: / Increment integer or pointer by 1.
21: % PEFFECT|PVALUE
22: DWORD ANYR * * TEMP
23: ADR DWORD|SHORT
24: 1|MMX *
25: [IFV] [TL ZMOVSX] [R],[AL]
26: [TL OP1] [AL]
27:
28: / Increment pointer by constant.
29: % PEFFECT|PVALUE
30: PTX ANYR * * TEMP
31: ADR DWORD
32: IMM|MMX LONG
33: [IFV] [ZMOV] [R],[AL]
34: [OP0] [AL],[AR]
35:
36: //////////
37: /
38: / Fields.
39: / My heart says there is a better way to do the field versions
40: / of this operator with a clever sequence of XCHG and XOR;
41: / however, I cannot think of it and neither can Trevor.
42: /
43: //////////
44:
45: / Field.
46: % PEFFECT|PVALUE|PBYTE
47: LONG ANYR * * TEMP
48: ADR|LV FLD
49: IMM|MMX LONG
50: [TL ZMOVZX] [R],[AL] / fetch
51: [IFV] [ZAND] [R],[EMASK] / extract
52: [IFV] [ZPUSH] [R] / save old value
53: [OP0] [R],[AR] / bump
54: [ZAND] [R],[EMASK] / mask
55: [TL ZAND] [AL],[TL CMASK] / clear
56: [TL ZOR] [AL],[TL R] / store
57: [IFV] [ZPOP] [R] / restore old value
58:
59: //////////
60: / end of n1/i386/tables/aft.t
61: //////////
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.