Enable Intel MOVDIRI, MOVDIR64B instructions
[binutils-gdb.git] / gas / testsuite / gas / tic54x / subsym.s
1 *
2 * String substitution symbols
3 *
4 ; if no quotes, interpret as subsymbol
5 ; if quotes, interpret as string, and do forced substitution
6 .sslist
7 .asg value,SYMBOL
8 .asg SYMBOL,SYMBOL1
9
10 .global label, x
11 .word x
12
13 * Substitution symbol functions
14 label: .word $symlen(SYMBOL) ; 5, substitutes string for symbol
15 .word $symlen(":SYMBOL:") ; 5, forced substitution
16 .word $symlen("SYMBOL") ; 6, uses string directly
17
18 .word $symcmp(SYMBOL,"value") ; 0
19
20 ; requires 2nd arg to be a character; zero if not found
21 .word $firstch(":SYMBOL:",'a') ; 2
22 .word $lastch(SYMBOL,'a') ; 2
23
24 .word $isdefed(SYMBOL) ; 0 (value not in symtab)
25 .word $isdefed("label") ; 1 (string contents in symtab)
26 .word $isdefed("unknown") ; 0
27
28 .asg "1,2,3", list
29 ; both args must be identifiers
30 .word $ismember(SYMBOL,list) ; 1
31 .word SYMBOL ; now 1
32 .word list ; now 2,3
33
34 .word $iscons("010b") ; 1
35 .word $iscons("11111111B") ; 1
36 .word $iscons("011") ; 2 (5 -- TI bug)
37 .word $iscons("0x10") ; 3 (0 -- TI bug)
38 .word $iscons("'a'") ; 4
39 .word $iscons(SYMBOL) ; 5 ("1")
40 .word $iscons("SYMBOL") ; 0
41
42 .word $isname(SYMBOL) ; 0
43
44 .word $isreg(SYMBOL) ; 0
45 .word $isreg("AR0") ;
46 ; .word $isreg("AG") ; should be 0, but we always
47 ; use mmregs
48 .mmregs
49 x .word $isreg("AG") ; 1 if .mmregs, 0 otherwise
50 tag .struct 10
51 .word 1
52 .endstruct
53 .word $structsz(tag)
54 .word $structacc(tag) ; this op is unspecified
55 .end