summaryrefslogtreecommitdiff
path: root/gas/testsuite/gas/tic80/add.s
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>1999-05-03 07:29:11 +0000
committerRichard Henderson <rth@redhat.com>1999-05-03 07:29:11 +0000
commit252b5132c753830d5fd56823373aed85f2a0db63 (patch)
tree1af963bfd8d3e55167b81def4207f175eaff3a56 /gas/testsuite/gas/tic80/add.s
downloadbinutils-gdb-252b5132c753830d5fd56823373aed85f2a0db63.tar.gz
19990502 sourceware importbinu_ss_19990502
Diffstat (limited to 'gas/testsuite/gas/tic80/add.s')
-rw-r--r--gas/testsuite/gas/tic80/add.s19
1 files changed, 19 insertions, 0 deletions
diff --git a/gas/testsuite/gas/tic80/add.s b/gas/testsuite/gas/tic80/add.s
new file mode 100644
index 00000000000..6c229ed1fe4
--- /dev/null
+++ b/gas/testsuite/gas/tic80/add.s
@@ -0,0 +1,19 @@
+; Test signed and unsigned addition instruction.
+; Test boundary conditions to ensure proper handling.
+; Note that unsigned addition still uses signed immediates.
+
+ add r10,r11,r12 ; Register form
+ add 16383,r2,r4 ; Maximum positive short signed immediate
+ add -16384,r4,r4 ; Minimum negative short signed immediate
+ add 16384,r5,r6 ; Minimum positive long signed immediate
+ add -16385,r7,r8 ; Maximum negative long signed immediate
+ add 2147483647,r10,r11 ; Maximum positive long signed immediate
+ add -2147483648,r12,r13 ; Minimum negative long signed immediate
+
+ addu r10,r11,r12 ; Register form
+ addu 16383,r2,r4 ; Maximum positive short signed immediate
+ addu -16384,r4,r4 ; Minimum negative short signed immediate
+ addu 16384,r5,r6 ; Minimum positive long signed immediate
+ addu -16385,r7,r8 ; Maximum negative long signed immediate
+ addu 2147483647,r10,r11 ; Maximum positive long signed immediate
+ addu -2147483648,r12,r13 ; Minimum negative long signed immediate