From 59d4847542fb9bdab89c2db195dc896bee353ee1 Mon Sep 17 00:00:00 2001 From: gibbed Date: Sat, 16 May 2015 16:43:43 -0500 Subject: [PATCH] More tests for cntlzw. --- src/xenia/cpu/frontend/test/instr_cntlzw.s | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/xenia/cpu/frontend/test/instr_cntlzw.s b/src/xenia/cpu/frontend/test/instr_cntlzw.s index f32b85727..b786f8a4f 100644 --- a/src/xenia/cpu/frontend/test/instr_cntlzw.s +++ b/src/xenia/cpu/frontend/test/instr_cntlzw.s @@ -55,3 +55,19 @@ test_cntlzw_4_constant: blr #_ REGISTER_OUT r5 0x7FFFFFFF #_ REGISTER_OUT r6 1 + +test_cntlzw_5: + #_ REGISTER_IN r5 0xFFFFFFFF00000001 + cntlzw r6, r5 + blr + #_ REGISTER_OUT r5 0xFFFFFFFF00000001 + #_ REGISTER_OUT r6 31 + +test_cntlzw_5_constant: + li r5, -1 + sldi r5, r5, 32 + addi r5, r5, 1 + cntlzw r6, r5 + blr + #_ REGISTER_OUT r5 0xFFFFFFFF00000001 + #_ REGISTER_OUT r6 31