diff options
author | bd <bdunahu@operationnull.com> | 2025-05-10 22:45:24 -0400 |
---|---|---|
committer | bd <bdunahu@operationnull.com> | 2025-05-10 22:45:24 -0400 |
commit | d1ef2e2171d660bac392c19bc0094c5e76c986f6 (patch) | |
tree | d5a3229f701873ce59f1c1e7ce6896a3f31568ca /input/over_or_under.asm | |
parent | 2d1701842bff269de7c07010eb490eeb7ac6f06e (diff) |
Add initial vector tests
Diffstat (limited to 'input/over_or_under.asm')
-rw-r--r-- | input/over_or_under.asm | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/input/over_or_under.asm b/input/over_or_under.asm new file mode 100644 index 0000000..4be18ab --- /dev/null +++ b/input/over_or_under.asm @@ -0,0 +1,57 @@ +;;;;;;;; +;;; tests the over/underflow conditions on various operations + +.data + n1 -1 + space1 0 0 0 0 0 0 0 ; space is added to load this as a vector + max 0x7FFFFFFF + space2 0 0 0 0 0 0 0 + min 0x80000000 + vSiz 8 + +.text + load $4 vSiz($0) + load $5 max($0) + load $6 min($0) + loadv $17 max($0) + loadv $18 min($0) + loadv $19 n1($0) + addi $7 $0 1 + addi $8 $0 -1 + jrl ADDROVER + +WIN: + nop + nop + nop + quot $0 $0 $0 + +ADDROVER: + add $0 $5 $7 + bof SUBRUNDER + jrl DIE + +SUBRUNDER: + sub $0 $6 $7 + buf MULROK + jrl DIE + +MULROK: + mul $0 $5 $7 + buf DIE + jrl MULVROVER + +MULVROVER: + mulv $16 $18 $19 + bof DIVVIOVER + jrl DIE + +DIVVIOVER: + divv $15 $18 $19 + bof WIN + jrl DIE + +DIE: + nop + nop + nop |