1# mips32 specific r6 tests - paired LL/SC variants
2# mach:  mips32r6
3# as:    -mabi=eabi
4# ld:    -N -Ttext=0x80010000 -Tdata=0x80020000
5# output: *\\npass\\n
6
7  .include "testutils.inc"
8  .include "utils-r6.inc"
9
10  .data
11  .align 8
12test_data:
13	.word 0xaaaaaaaa
14	.word 0xbbbbbbbb
15end_check:
16	.byte 0
17	.byte 0
18	.byte 0
19	.byte 0x1
20  .text
21
22  setup
23
24  .ent DIAG
25DIAG:
26  writemsg "[1] Test LLWP"
27  llwp	$2, $3, test_data
28  checkpair_dword $2, $3, test_data, end_check
29
30  sll $2, $2, 1
31  srl $3, $3, 1
32  move  $s0, $2
33
34  scwp	$2, $3, test_data
35  check32 $2, 1
36  checkpair_dword $s0, $3, test_data, end_check
37  writemsg "[2] Test SCWP, done"
38
39pass
40
41  .end DIAG
42