llvm-project/lldb
Michal Gorny acbaa496ec [lldb] [lit] Use more readable consts and arrays in register read tests
Replace the constants used for r8/mm/xmm/ymm/zmm tests with something
more readable to ease debugging in case of failures (0x00 0x01 ...).
While at it, put the constants in array and copy them from memory
to simplify inline asm.

The original constants grew out of necessity.  The xmm constants were
'weird' because they were intended to be different from mm constants
(as that was necessary to catch NetBSD implementation bug).  The ymm
constants were made even weirded to not even partially collide with
other xmm registers (not saying it made sense, just how it was done).
Then, zmm constants were once again designed to avoid accidental
collisions with xmm and ymm constants, and at the same the 16 extra
registers required even more shuffling.

The new constants are meant to be more user-readable, so that a mistake
could be easily spotted.  All of xmm, ymm and zmm tests use a sequence
of {0x00 0x01 0x02 ...}, shifted by 1 for every register.  This should
provide enough uniquity, and space for future increase in number of
registers.  Since mm and r8..r15 are printed as uint64_t rather than
byte-by-byte, they use 0x000102...  As a result, on x86 endianness takes
care of making mm different than xmm.

The use of arrays is something I had to learn for zmm write tests.  It
avoids having to specify all the input values separately, and makes
GCC happy about zmm-read test (it was rejected previously because of
hitting a limit of 30 constraints).

llvm-svn: 360041
2019-05-06 13:06:43 +00:00
..
cmake [CMake] Fix subtle CMake bug 2019-04-29 19:44:43 +00:00
docs [CMake] Fix subtle CMake bug 2019-04-29 19:44:43 +00:00
examples [Python] Simplify the code. NFCI. 2019-04-18 23:24:54 +00:00
include/lldb C.128 override, virtual keyword handling 2019-05-03 10:03:28 +00:00
lit [lldb] [lit] Use more readable consts and arrays in register read tests 2019-05-06 13:06:43 +00:00
lldb.xcodeproj Add CxxModuleHandler to Xcode project 2019-04-30 18:21:14 +00:00
lldb.xcworkspace Remove accidentally commited file in xcshareddata 2019-02-05 23:35:01 +00:00
packages/Python/lldbsuite [test] Remove randomness 2019-05-05 18:54:16 +00:00
resources [CMake] Revised LLDB.framework builds 2019-01-04 12:46:50 +00:00
scripts Kill modify-python-lldb.py 2019-04-24 13:23:19 +00:00
source Merge GetCompileUnitAtOffset + GetCompileUnitContainingDIEOffset 2019-05-06 12:01:38 +00:00
test [CMake] Fix subtle CMake bug 2019-04-29 19:44:43 +00:00
third_party/Python/module [lldb/thirdparty] Remove unneeded files, asked by Jonas. 2019-03-12 20:41:36 +00:00
tools Make lldb-mi optional and change how we deal with missing tools in lit 2019-05-03 20:33:58 +00:00
unittests C.128 override, virtual keyword handling 2019-05-03 10:03:28 +00:00
utils [lldb] [lit] Add tests for reading ZMM registers (AVX512) 2019-04-29 11:38:10 +00:00
.arcconfig
.clang-format
.gitignore Add .noindex to the gitignore 2019-04-05 17:57:42 +00:00
CMakeLists.txt [CMake] Fix subtle CMake bug 2019-04-29 19:44:43 +00:00
CODE_OWNERS.txt Fix/unify the spelling of Objective-C. 2018-06-13 16:21:24 +00:00
INSTALL.txt Fix build URL in new LLDB website 2019-05-01 09:55:00 +00:00
LICENSE.TXT Fix typos throughout the license files that somehow I and my reviewers 2019-01-21 09:52:34 +00:00
use_lldb_suite_root.py