Added constant tests for cntlzd and cntlzw.
This commit is contained in:
parent
a94234df52
commit
19e733cff7
|
@ -5,6 +5,13 @@ test_cntlzd_1:
|
||||||
#_ REGISTER_OUT r5 0
|
#_ REGISTER_OUT r5 0
|
||||||
#_ REGISTER_OUT r6 64
|
#_ REGISTER_OUT r6 64
|
||||||
|
|
||||||
|
test_cntlzd_1_constant:
|
||||||
|
li r5, 0
|
||||||
|
cntlzd r6, r5
|
||||||
|
blr
|
||||||
|
#_ REGISTER_OUT r5 0
|
||||||
|
#_ REGISTER_OUT r6 64
|
||||||
|
|
||||||
test_cntlzd_2:
|
test_cntlzd_2:
|
||||||
#_ REGISTER_IN r5 1
|
#_ REGISTER_IN r5 1
|
||||||
cntlzd r6, r5
|
cntlzd r6, r5
|
||||||
|
@ -12,6 +19,13 @@ test_cntlzd_2:
|
||||||
#_ REGISTER_OUT r5 1
|
#_ REGISTER_OUT r5 1
|
||||||
#_ REGISTER_OUT r6 63
|
#_ REGISTER_OUT r6 63
|
||||||
|
|
||||||
|
test_cntlzd_2_constant:
|
||||||
|
li r5, 1
|
||||||
|
cntlzd r6, r5
|
||||||
|
blr
|
||||||
|
#_ REGISTER_OUT r5 1
|
||||||
|
#_ REGISTER_OUT r6 63
|
||||||
|
|
||||||
test_cntlzd_3:
|
test_cntlzd_3:
|
||||||
#_ REGISTER_IN r5 0xFFFFFFFFFFFFFFFF
|
#_ REGISTER_IN r5 0xFFFFFFFFFFFFFFFF
|
||||||
cntlzd r6, r5
|
cntlzd r6, r5
|
||||||
|
@ -19,9 +33,26 @@ test_cntlzd_3:
|
||||||
#_ REGISTER_OUT r5 0xFFFFFFFFFFFFFFFF
|
#_ REGISTER_OUT r5 0xFFFFFFFFFFFFFFFF
|
||||||
#_ REGISTER_OUT r6 0
|
#_ REGISTER_OUT r6 0
|
||||||
|
|
||||||
|
test_cntlzd_3_constant:
|
||||||
|
li r5, 0
|
||||||
|
not r5, r5
|
||||||
|
cntlzd r6, r5
|
||||||
|
blr
|
||||||
|
#_ REGISTER_OUT r5 0xFFFFFFFFFFFFFFFF
|
||||||
|
#_ REGISTER_OUT r6 0
|
||||||
|
|
||||||
test_cntlzd_4:
|
test_cntlzd_4:
|
||||||
#_ REGISTER_IN r5 0x7FFFFFFFFFFFFFFF
|
#_ REGISTER_IN r5 0x7FFFFFFFFFFFFFFF
|
||||||
cntlzd r6, r5
|
cntlzd r6, r5
|
||||||
blr
|
blr
|
||||||
#_ REGISTER_OUT r5 0x7FFFFFFFFFFFFFFF
|
#_ REGISTER_OUT r5 0x7FFFFFFFFFFFFFFF
|
||||||
#_ REGISTER_OUT r6 1
|
#_ REGISTER_OUT r6 1
|
||||||
|
|
||||||
|
test_cntlzd_4_constant:
|
||||||
|
li r5, 0
|
||||||
|
not r5, r5
|
||||||
|
srdi r5, r5, 1
|
||||||
|
cntlzd r6, r5
|
||||||
|
blr
|
||||||
|
#_ REGISTER_OUT r5 0x7FFFFFFFFFFFFFFF
|
||||||
|
#_ REGISTER_OUT r6 1
|
||||||
|
|
|
@ -5,6 +5,13 @@ test_cntlzw_1:
|
||||||
#_ REGISTER_OUT r5 0
|
#_ REGISTER_OUT r5 0
|
||||||
#_ REGISTER_OUT r6 32
|
#_ REGISTER_OUT r6 32
|
||||||
|
|
||||||
|
test_cntlzw_1_constant:
|
||||||
|
li r5, 0
|
||||||
|
cntlzw r6, r5
|
||||||
|
blr
|
||||||
|
#_ REGISTER_OUT r5 0
|
||||||
|
#_ REGISTER_OUT r6 32
|
||||||
|
|
||||||
test_cntlzw_2:
|
test_cntlzw_2:
|
||||||
#_ REGISTER_IN r5 1
|
#_ REGISTER_IN r5 1
|
||||||
cntlzw r6, r5
|
cntlzw r6, r5
|
||||||
|
@ -12,6 +19,13 @@ test_cntlzw_2:
|
||||||
#_ REGISTER_OUT r5 1
|
#_ REGISTER_OUT r5 1
|
||||||
#_ REGISTER_OUT r6 31
|
#_ REGISTER_OUT r6 31
|
||||||
|
|
||||||
|
test_cntlzw_2_constant:
|
||||||
|
li r5, 1
|
||||||
|
cntlzw r6, r5
|
||||||
|
blr
|
||||||
|
#_ REGISTER_OUT r5 1
|
||||||
|
#_ REGISTER_OUT r6 31
|
||||||
|
|
||||||
test_cntlzw_3:
|
test_cntlzw_3:
|
||||||
#_ REGISTER_IN r5 0xFFFFFFFF
|
#_ REGISTER_IN r5 0xFFFFFFFF
|
||||||
cntlzw r6, r5
|
cntlzw r6, r5
|
||||||
|
@ -19,9 +33,27 @@ test_cntlzw_3:
|
||||||
#_ REGISTER_OUT r5 0xFFFFFFFF
|
#_ REGISTER_OUT r5 0xFFFFFFFF
|
||||||
#_ REGISTER_OUT r6 0
|
#_ REGISTER_OUT r6 0
|
||||||
|
|
||||||
|
test_cntlzw_3_constant:
|
||||||
|
li r5, 0
|
||||||
|
not r5, r5
|
||||||
|
srwi r5, r5, 0
|
||||||
|
cntlzw r6, r5
|
||||||
|
blr
|
||||||
|
#_ REGISTER_OUT r5 0xFFFFFFFF
|
||||||
|
#_ REGISTER_OUT r6 0
|
||||||
|
|
||||||
test_cntlzw_4:
|
test_cntlzw_4:
|
||||||
#_ REGISTER_IN r5 0x7FFFFFFF
|
#_ REGISTER_IN r5 0x7FFFFFFF
|
||||||
cntlzw r6, r5
|
cntlzw r6, r5
|
||||||
blr
|
blr
|
||||||
#_ REGISTER_OUT r5 0x7FFFFFFF
|
#_ REGISTER_OUT r5 0x7FFFFFFF
|
||||||
#_ REGISTER_OUT r6 1
|
#_ REGISTER_OUT r6 1
|
||||||
|
|
||||||
|
test_cntlzw_4_constant:
|
||||||
|
li r5, 0
|
||||||
|
not r5, r5
|
||||||
|
srwi r5, r5, 1
|
||||||
|
cntlzw r6, r5
|
||||||
|
blr
|
||||||
|
#_ REGISTER_OUT r5 0x7FFFFFFF
|
||||||
|
#_ REGISTER_OUT r6 1
|
||||||
|
|
Loading…
Reference in New Issue