URL
https://opencores.org/ocsvn/or1k/or1k/trunk
Subversion Repositories or1k
[/] [or1k/] [trunk/] [gdb-5.3/] [sim/] [testsuite/] [sim/] [fr30/] [mulh.cgs] - Rev 1765
Compare with Previous | Blame | View Log
# fr30 testcase for mulh $Rj,$Ri# mach(): fr30.include "testutils.inc"START.text.global mulhmulh:; Test mulh $Rj,$Ri; Positive operandsmvi_h_gr 0xdead0003,r7 ; multiply small numbersmvi_h_gr 0xbeef0002,r8set_cc 0x09 ; Set mask opposite of expectedmulh r7,r8test_cc 0 1 0 1test_h_dr 6,mdlmvi_h_gr 0xdead0001,r7 ; multiply by 1mvi_h_gr 0xbeef0002,r8set_cc 0x08 ; Set mask opposite of expectedmulh r7,r8test_cc 0 1 0 0test_h_dr 2,mdlmvi_h_gr 0xdead0002,r7 ; multiply by 1mvi_h_gr 0xbeef0001,r8set_cc 0x09 ; Set mask opposite of expectedmulh r7,r8test_cc 0 1 0 1test_h_dr 2,mdlmvi_h_gr 0xdead0000,r7 ; multiply by 0mvi_h_gr 0xbeef0002,r8set_cc 0x09 ; Set mask opposite of expectedmulh r7,r8test_cc 0 1 0 1test_h_dr 0,mdlmvi_h_gr 0xdead0002,r7 ; multiply by 0mvi_h_gr 0xbeef0000,r8set_cc 0x08 ; Set mask opposite of expectedmulh r7,r8test_cc 0 1 0 0test_h_dr 0,mdlmvi_h_gr 0xdead3fff,r7 ; 15 bit resultmvi_h_gr 0xbeef0002,r8set_cc 0x09 ; Set mask opposite of expectedmulh r7,r8test_cc 0 1 0 1test_h_dr 0x00007ffe,mdlmvi_h_gr 0xdead4000,r7 ; 16 bit resultmvi_h_gr 0xbeef0002,r8set_cc 0x0a ; Set mask opposite of expectedmulh r7,r8test_cc 0 1 1 0test_h_dr 0x00008000,mdlmvi_h_gr 0xdead4000,r7 ; 17 bit resultmvi_h_gr 0xbeef0004,r8set_cc 0x0b ; Set mask opposite of expectedmulh r7,r8test_cc 0 1 1 1test_h_dr 0x00010000,mdlmvi_h_gr 0xdead7fff,r7 ; max positive resultmvi_h_gr 0xbeef7fff,r8set_cc 0x0b ; Set mask opposite of expectedmulh r7,r8test_cc 0 1 1 1test_h_dr 0x3fff0001,mdl; Mixed operandsmvi_h_gr -3,r7 ; multiply small numbersmvi_h_gr 2,r8set_cc 0x05 ; Set mask opposite of expectedmulh r7,r8test_cc 1 0 0 1test_h_dr -6,mdlmvi_h_gr 3,r7 ; multiply small numbersmvi_h_gr -2,r8set_cc 0x05 ; Set mask opposite of expectedmulh r7,r8test_cc 1 0 0 1test_h_dr -6,mdlmvi_h_gr 1,r7 ; multiply by 1mvi_h_gr -2,r8set_cc 0x04 ; Set mask opposite of expectedmulh r7,r8test_cc 1 0 0 0test_h_dr -2,mdlmvi_h_gr -2,r7 ; multiply by 1mvi_h_gr 1,r8set_cc 0x05 ; Set mask opposite of expectedmulh r7,r8test_cc 1 0 0 1test_h_dr -2,mdlmvi_h_gr 0,r7 ; multiply by 0mvi_h_gr -2,r8set_cc 0x09 ; Set mask opposite of expectedmulh r7,r8test_cc 0 1 0 1test_h_dr 0,mdlmvi_h_gr -2,r7 ; multiply by 0mvi_h_gr 0,r8set_cc 0x08 ; Set mask opposite of expectedmulh r7,r8test_cc 0 1 0 0test_h_dr 0,mdlmvi_h_gr 0xdead2001,r7 ; 15 bit resultmvi_h_gr -2,r8set_cc 0x05 ; Set mask opposite of expectedmulh r7,r8test_cc 1 0 0 1test_h_dr 0xffffbffe,mdlmvi_h_gr 0xdead4000,r7 ; 16 bit resultmvi_h_gr -2,r8set_cc 0x04 ; Set mask opposite of expectedmulh r7,r8test_cc 1 0 0 0test_h_dr 0xffff8000,mdlmvi_h_gr 0xdead4001,r7 ; 16 bit resultmvi_h_gr -2,r8set_cc 0x06 ; Set mask opposite of expectedmulh r7,r8test_cc 1 0 1 0test_h_dr 0xffff7ffe,mdlmvi_h_gr 0xdead4000,r7 ; 17 bit resultmvi_h_gr -4,r8set_cc 0x07 ; Set mask opposite of expectedmulh r7,r8test_cc 1 0 1 1test_h_dr 0xffff0000,mdlmvi_h_gr 0xdead7fff,r7 ; max negative resultmvi_h_gr 0xbeef8000,r8set_cc 0x07 ; Set mask opposite of expectedmulh r7,r8test_cc 1 0 1 1test_h_dr 0xc0008000,mdl; Negative operandsmvi_h_gr -3,r7 ; multiply small numbersmvi_h_gr -2,r8set_cc 0x09 ; Set mask opposite of expectedmulh r7,r8test_cc 0 1 0 1test_h_dr 6,mdlmvi_h_gr -1,r7 ; multiply by 1mvi_h_gr -2,r8set_cc 0x08 ; Set mask opposite of expectedmulh r7,r8test_cc 0 1 0 0test_h_dr 2,mdlmvi_h_gr -2,r7 ; multiply by 1mvi_h_gr -1,r8set_cc 0x09 ; Set mask opposite of expectedmulh r7,r8test_cc 0 1 0 1test_h_dr 2,mdlmvi_h_gr 0xdeadc001,r7 ; 15 bit resultmvi_h_gr -2,r8set_cc 0x09 ; Set mask opposite of expectedmulh r7,r8test_cc 0 1 0 1test_h_dr 0x00007ffe,mdlmvi_h_gr 0xdeadc000,r7 ; 16 bit resultmvi_h_gr -2,r8set_cc 0x0a ; Set mask opposite of expectedmulh r7,r8test_cc 0 1 1 0test_h_dr 0x00008000,mdlmvi_h_gr 0xdeadc000,r7 ; 17 bit resultmvi_h_gr -4,r8set_cc 0x0b ; Set mask opposite of expectedmulh r7,r8test_cc 0 1 1 1test_h_dr 0x00010000,mdlmvi_h_gr 0xdead8001,r7 ; almost max positive resultmvi_h_gr 0xbeef8001,r8set_cc 0x0b ; Set mask opposite of expectedmulh r7,r8test_cc 0 1 1 1test_h_dr 0x3fff0001,mdlmvi_h_gr 0xdead8000,r7 ; max positive resultmvi_h_gr 0xbeef8000,r8set_cc 0x0b ; Set mask opposite of expectedmulh r7,r8test_cc 0 1 1 1test_h_dr 0x40000000,mdlpass
