From 4bb31c296dbd9f176a84918e5508d22505519569 Mon Sep 17 00:00:00 2001 From: George Koehler Date: Thu, 21 Dec 2017 18:19:26 -0500 Subject: [PATCH] Revise the comments in the EM tests. You can cheat these tests if _cms_ and _cmu_ always push zero. --- tests/plat/dup_e.e | 6 ++++-- tests/plat/exg_e.e | 6 ++++-- tests/plat/rotate_e.e | 6 +++++- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/tests/plat/dup_e.e b/tests/plat/dup_e.e index c0e0001b3..649589d84 100644 --- a/tests/plat/dup_e.e +++ b/tests/plat/dup_e.e @@ -2,8 +2,10 @@ mes 2, EM_WSIZE, EM_PSIZE /* - * Test _dup_ and _dus_ by loading 20 bytes from _src_, then making - * and checking some duplicates. + * Tests _dup_ and _dus_ by loading 20 bytes from _src_, then making + * and checking some duplicates. The compilers might never _dup_ or + * _dus_ with large sizes, so the compilers might work even if this + * test fails. You can cheat this test if _cms_ always pushes zero. */ exa src diff --git a/tests/plat/exg_e.e b/tests/plat/exg_e.e index 617f07104..455256483 100644 --- a/tests/plat/exg_e.e +++ b/tests/plat/exg_e.e @@ -2,8 +2,10 @@ mes 2, EM_WSIZE, EM_PSIZE /* - * Test _exg_ by loading 40 bytes from _src_, then exchanging 20 and - * 20 bytes, and checking the result. + * Tests _exg_ by loading 40 bytes from _src_, then exchanging 20 and + * 20 bytes, and checking the result. The compilers might never _exg_ + * large sizes, so the compilers might work even if this test fails. + * You can cheat this test if _cms_ always pushes zero. */ exa src diff --git a/tests/plat/rotate_e.e b/tests/plat/rotate_e.e index a6f8f28dd..0698c58a0 100644 --- a/tests/plat/rotate_e.e +++ b/tests/plat/rotate_e.e @@ -2,12 +2,16 @@ mes 2, EM_WSIZE, EM_PSIZE /* - * Test _rol_ (rotate left) and _ror_ (rotate right). + * Tests _rol_ (rotate left) and _ror_ (rotate right). Several back + * ends provide _rol_ and _ror_, but as of year 2017, the compilers + * and optimizers had never emit _rol_ nor _ror_. * * By tradition, _rol_ and _ror_ can't rotate values shorter than the * word size, or longer than 4 bytes. * - If word size is 2, then try rotating 2-byte and 4-byte values. * - If word size is 4, then try rotating 4-byte values. + * + * You can cheat this test if _cmu_ always pushes zero. */ #if EM_WSIZE == 2