From 1564e65c2d760dc95f7f69a80455e1e1f394fe00 Mon Sep 17 00:00:00 2001 From: David Given Date: Sun, 10 Feb 2019 23:39:15 +0100 Subject: [PATCH] Add tests for simple comparisons (which i80 fails). --- tests/plat/core/cmi_e.e | 114 ++++++++++++++++++++++++++++++++++++++++ tests/plat/core/cmu_e.e | 111 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 225 insertions(+) create mode 100644 tests/plat/core/cmi_e.e create mode 100644 tests/plat/core/cmu_e.e diff --git a/tests/plat/core/cmi_e.e b/tests/plat/core/cmi_e.e new file mode 100644 index 000000000..43589ee12 --- /dev/null +++ b/tests/plat/core/cmi_e.e @@ -0,0 +1,114 @@ +# + mes 2, EM_WSIZE, EM_PSIZE + + exp $_m_a_i_n + pro $_m_a_i_n, 0 + +mbig + #if EM_WSIZE == 2 + rom 32768 + #else + rom 2147483648 + #endif +mone + rom -1 +zero + rom 0 +one + rom 1 +big + #if EM_WSIZE == 2 + rom 32767 + #else + rom 2147483647 + #endif + + /* 0 < 1 */ + + loe zero + loe one + blt *1 + cmi EM_WSIZE + zlt *1 + + loc __LINE__ + cal $fail + asp EM_WSIZE +1 + + /* 1 > 0 */ + + loe one + loe zero + cmi EM_WSIZE + zgt *2 + + loc __LINE__ + cal $fail + asp EM_WSIZE +2 + + /* 0 <= 0 */ + + loe zero + loe zero + cmi EM_WSIZE + zle *3 + + loc __LINE__ + cal $fail + asp EM_WSIZE +3 + + /* 0 >= 0 */ + + loe zero + loe zero + cmi EM_WSIZE + zge *4 + + loc __LINE__ + cal $fail + asp EM_WSIZE +4 + + /* INT_MIN < 1 */ + + loe mbig + loe one + cmi EM_WSIZE + zlt *5 + + loc __LINE__ + cal $fail + asp EM_WSIZE +5 + + /* 1 > INT_MIN */ + + loe one + loe mbig + cmi EM_WSIZE + zgt *6 + + loc __LINE__ + cal $fail + asp EM_WSIZE +6 + + /* INT_MIN < INT_MAX */ + + loe mbig + loe big + cmi EM_WSIZE + zlt *7 + + loc __LINE__ + cal $fail + asp EM_WSIZE +7 + + cal $finished + end + + diff --git a/tests/plat/core/cmu_e.e b/tests/plat/core/cmu_e.e new file mode 100644 index 000000000..62b83d798 --- /dev/null +++ b/tests/plat/core/cmu_e.e @@ -0,0 +1,111 @@ +# + mes 2, EM_WSIZE, EM_PSIZE + + exp $_m_a_i_n + pro $_m_a_i_n, 0 + +mbig + #if EM_WSIZE == 2 + rom 32768 + #else + rom 2147483648 + #endif +mone + rom -1 +zero + rom 0 +one + rom 1 +big + #if EM_WSIZE == 2 + rom 32767 + #else + rom 2147483647 + #endif + + /* 0 < 1 */ + + loe zero + loe one + cmu EM_WSIZE + zlt *1 + + loc __LINE__ + cal $fail + asp EM_WSIZE +1 + + /* 1 > 0 */ + + loe one + loe zero + cmu EM_WSIZE + zgt *2 + + loc __LINE__ + cal $fail + asp EM_WSIZE +2 + + /* 0 <= 0 */ + + loe zero + loe zero + cmu EM_WSIZE + zle *3 + + loc __LINE__ + cal $fail + asp EM_WSIZE +3 + + /* 0 >= 0 */ + + loe zero + loe zero + cmu EM_WSIZE + zge *4 + + loc __LINE__ + cal $fail + asp EM_WSIZE +4 + + /* INT_MIN > 1 */ + + loe mbig + loe one + cmu EM_WSIZE + zgt *5 + + loc __LINE__ + cal $fail + asp EM_WSIZE +5 + + /* 1 < INT_MIN */ + + loe one + loe mbig + cmu EM_WSIZE + zlt *6 + + loc __LINE__ + cal $fail + asp EM_WSIZE +6 + + /* INT_MIN > INT_MAX */ + + loe mbig + loe big + cmu EM_WSIZE + zgt *7 + + loc __LINE__ + cal $fail + asp EM_WSIZE +7 + + cal $finished + end