Received: from eggs.gnu.org ([208.118.235.92]:54727) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UDMOv-00051I-Tr for qemu-devel@nongnu.org; Wed, 06 Mar 2013 17:01:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UDMOt-0004jT-HT for qemu-devel@nongnu.org; Wed, 06 Mar 2013 17:01:29 -0500 Received: from ssl.serverraum.org ([88.198.40.39]:47195) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UDMOt-0004jD-BW for qemu-devel@nongnu.org; Wed, 06 Mar 2013 17:01:27 -0500 From: Michael Walle Date: Wed, 6 Mar 2013 23:00:03 +0100 Message-Id: <1362607209-12232-7-git-send-email-michael@walle.cc> In-Reply-To: <1362607209-12232-1-git-send-email-michael@walle.cc> References: <1362607209-12232-1-git-send-email-michael@walle.cc> Subject: [Qemu-devel] [PATCH 06/12] tests: tcg: lm32: add more test cases List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Michael Walle Esp. for testing zero/sign extend in compare operations. Signed-off-by: Michael Walle --- tests/tcg/lm32/test_cmpgei.S | 15 +++++++++++++++ tests/tcg/lm32/test_cmpgeui.S | 15 +++++++++++++++ tests/tcg/lm32/test_cmpgi.S | 15 +++++++++++++++ tests/tcg/lm32/test_cmpgui.S | 17 ++++++++++++++++- 4 files changed, 61 insertions(+), 1 deletions(-) diff --git a/tests/tcg/lm32/test_cmpgei.S b/tests/tcg/lm32/test_cmpgei.S index 6a8870f..6e388a2 100644 --- a/tests/tcg/lm32/test_cmpgei.S +++ b/tests/tcg/lm32/test_cmpgei.S @@ -52,4 +52,19 @@ mvi r3, 0 cmpgei r3, r3, 0 check_r3 1 +test_name CMPGEI_11 +mvi r1, 0 +cmpgei r3, r1, -32768 +check_r3 1 + +test_name CMPGEI_12 +mvi r1, -1 +cmpgei r3, r1, -32768 +check_r3 1 + +test_name CMPGEI_13 +mvi r1, -32768 +cmpgei r3, r1, -32768 +check_r3 1 + end diff --git a/tests/tcg/lm32/test_cmpgeui.S b/tests/tcg/lm32/test_cmpgeui.S index b9d1755..3866d96 100644 --- a/tests/tcg/lm32/test_cmpgeui.S +++ b/tests/tcg/lm32/test_cmpgeui.S @@ -52,4 +52,19 @@ mvi r3, 0 cmpgeui r3, r3, 0 check_r3 1 +test_name CMPGEUI_11 +mvi r1, 0 +cmpgeui r3, r1, 0x8000 +check_r3 0 + +test_name CMPGEUI_12 +mvi r1, -1 +cmpgeui r3, r1, 0x8000 +check_r3 1 + +test_name CMPGEUI_13 +ori r1, r0, 0x8000 +cmpgeui r3, r1, 0x8000 +check_r3 1 + end diff --git a/tests/tcg/lm32/test_cmpgi.S b/tests/tcg/lm32/test_cmpgi.S index 1f622d2..21695f9 100644 --- a/tests/tcg/lm32/test_cmpgi.S +++ b/tests/tcg/lm32/test_cmpgi.S @@ -52,4 +52,19 @@ mvi r3, 0 cmpgi r3, r3, 0 check_r3 0 +test_name CMPGI_11 +mvi r1, 0 +cmpgi r3, r1, -32768 +check_r3 1 + +test_name CMPGI_12 +mvi r1, -1 +cmpgi r3, r1, -32768 +check_r3 1 + +test_name CMPGI_13 +mvi r1, -32768 +cmpgi r3, r1, -32768 +check_r3 0 + end diff --git a/tests/tcg/lm32/test_cmpgui.S b/tests/tcg/lm32/test_cmpgui.S index 759bb64..dd94001 100644 --- a/tests/tcg/lm32/test_cmpgui.S +++ b/tests/tcg/lm32/test_cmpgui.S @@ -35,7 +35,7 @@ check_r3 1 test_name CMPGUI_7 mvi r1, -1 cmpgui r3, r1, 0xffff -check_r3 0 +check_r3 1 test_name CMPGUI_8 mvi r3, 0 @@ -52,4 +52,19 @@ mvi r3, 0 cmpgui r3, r3, 0 check_r3 0 +test_name CMPGUI_11 +mvi r1, 0 +cmpgui r3, r1, 0x8000 +check_r3 0 + +test_name CMPGUI_12 +mvi r1, -1 +cmpgui r3, r1, 0x8000 +check_r3 1 + +test_name CMPGUI_13 +ori r1, r0, 0x8000 +cmpgui r3, r1, 0x8000 +check_r3 0 + end -- 1.7.2.5