Update
[gdb.git] / sim / testsuite / d10v-elf / t-mod-ld-pre.s
blob4536e0344e1ae5afba1317050be445bb1b5238f4
1 .include "t-macros.i"
3 .section .rodata
5 .text
6 .globl main
7 .type main,@function
8 main:
9 mvfc r0, PSW || ldi.s r14, #0
10 ldi.l r2, 0x100 ; MOD_E
11 ldi.l r3, 0x108 ; MOD_S
13 test_mod_dec_ld:
14 mvtc r2, MOD_E || bseti r0, #7
15 mvtc r3, MOD_S
16 mvtc r0, PSW ; modulo mode enable
17 mv r1,r3 ; r1=0x108
18 ld r4, @r1- || nop ; r1=0x106
19 ld r4, @r1- || nop ; r1=0x104
20 ld r4, @r1- || nop ; r1=0x102
21 ld r4, @r1- || nop ; r1=0x100
22 ld r4, @r1- || nop ; r1=0x108
23 ld r4, @r1- || nop ; r1=0x106
25 cmpeqi r1,#0x106
26 brf0f _ERR ; branch to error
28 test_mod_inc_ld:
29 mvtc r2, MOD_S
30 mvtc r3, MOD_E
31 mv r1,r2 ; r1=0x100
32 ld r4, @r1+ || nop ; r1=0x102
33 ld r4, @r1+ || nop ; r1=0x104
34 ld r4, @r1+ || nop ; r1=0x106
35 ld r4, @r1+ || nop ; r1=0x108
36 ld r4, @r1+ || nop ; r1=0x100
37 ld r4, @r1+ || nop ; r1=0x102
39 cmpeqi r1,#0x102
40 brf0f _ERR
42 test_mod_dec_ld2w:
43 mvtc r2, MOD_E
44 mvtc r3, MOD_S
45 mv r1,r3 ; r1=0x108
46 ld2W r4, @r1- || nop ; r1=0x104
47 ld2W r4, @r1- || nop ; r1=0x100
48 ld2W r4, @r1- || nop ; r1=0x108
49 ld2W r4, @r1- || nop ; r1=0x104
51 cmpeqi r1,#0x104
52 brf0f _ERR ; <= branch to error
54 test_mod_inc_ld2w:
55 mvtc r2, MOD_S
56 mvtc r3, MOD_E || BCLRI r0, #7
57 mv r1,r2 ; r1=0x100
58 ld2W r4, @r1+ || nop ; r1=0x104
59 ld2W r4, @r1+ || nop ; r1=0x108
60 ld2W r4, @r1+ || nop ; r1=0x100
61 ld2W r4, @r1+ || nop ; r1=0x104
63 cmpeqi r1,#0x104
64 brf0f _ERR
66 test_mod_dec_ld_dis:
67 mvtc r0, PSW ; modulo mode disable
68 mvtc r2, MOD_E
69 mvtc r3, MOD_S
70 mv r1,r3 ; r1=0x108
71 ld r4, @r1- || nop ; r1=0x106
72 ld r4, @r1- || nop ; r1=0x104
73 ld r4, @r1- || nop ; r1=0x102
74 ld r4, @r1- || nop ; r1=0x100
75 ld r4, @r1- || nop ; r1=0xFE
76 ld r4, @r1- || nop ; r1=0xFC
78 cmpeqi r1,#0xFC
79 brf0f _ERR
81 test_mod_inc_ld_dis:
82 mvtc r2, MOD_S
83 mvtc r3, MOD_E
84 mv r1,r2 ; r1=0x100
85 ld r4, @r1+ || nop ; r1=0x102
86 ld r4, @r1+ || nop ; r1=0x104
87 ld r4, @r1+ || nop ; r1=0x106
88 ld r4, @r1+ || nop ; r1=0x108
89 ld r4, @r1+ || nop ; r1=0x10A
90 ld r4, @r1+ || nop ; r1=0x10C
92 cmpeqi r1,#0x10C
93 brf0f _ERR
95 test_mod_dec_ld2w_dis:
96 mvtc r2, MOD_E
97 mvtc r3, MOD_S
98 mv r1,r3 ; r1=0x108
99 ld2W r4, @r1- || nop ; r1=0x104
100 ld2W r4, @r1- || nop ; r1=0x100
101 ld2W r4, @r1- || nop ; r1=0xFC
102 ld2W r4, @r1- || nop ; r1=0xF8
104 cmpeqi r1,#0xF8
105 brf0f _ERR
107 test_mod_inc_ld2w_dis:
108 mvtc r2, MOD_S
109 mvtc r3, MOD_E
110 mv r1,r2 ; r1=0x100
111 ld2W r4, @r1+ || nop ; r1=0x104
112 ld2W r4, @r1+ || nop ; r1=0x108
113 ld2W r4, @r1+ || nop ; r1=0x10C
114 ld2W r4, @r1+ || nop ; r1=0x110
116 cmpeqi r1,#0x110
117 brf0f _ERR
119 _OK:
120 exit0
122 _ERR:
123 exit47