[PATCH 47/57][Arm][OBJDUMP] Add support for MVE instructions: vaddv, vmlaldav, vmlada...
[binutils-gdb.git] / sim / testsuite / d10v-elf / t-subi.s
blob81faad5ec24a23fdfb2ed6af85ae4d7490b7dd63
1 .include "t-macros.i"
3 start
5 ;; The d10v implements negated addition for subtraction
7 .macro check_subi s x y r c v
8 ;; clear carry
9 ldi r6,#0x8004
10 mvtc r6,cr0
11 ;; subtract
12 ldi r10,#\x
13 SUBI r10,#\y
14 ;; verify result
15 ldi r11, #\r
16 cmpeq r10, r11
17 brf0t 1f
18 ldi r6, 1
19 ldi r2, \s
20 trap 15
22 ;; verify carry
23 mvfc r6, cr0
24 and3 r6, r6, #1
25 cmpeqi r6, #\c
26 brf0t 1f
27 ldi r6, 1
28 ldi r2, \s
29 trap 15
31 .endm
33 check_subi 1 0000 0x0000 0xfff0 00 ;; 0 - 0x10
34 check_subi 2 0x0000 0x0001 0xffff 0 0
35 check_subi 3 0x0001 0x0000 0xfff1 0 0
36 check_subi 4 0x0001 0x0001 0x0000 1 0
37 check_subi 5 0x8000 0x0001 0x7fff 1 1
39 exit0