diff options
| author | Jonas Devlieghere <jonas@devlieghere.com> | 2019-10-09 16:38:47 +0000 |
|---|---|---|
| committer | Jonas Devlieghere <jonas@devlieghere.com> | 2019-10-09 16:38:47 +0000 |
| commit | 22314179f0660c172514b397060fd8f34b586e82 (patch) | |
| tree | afb3f04cd285733772ffceec4ccf3d8539dca91c /lldb/test/Shell/Register/Inputs/x86-64-read.cpp | |
| parent | df14bd315db94d286c0c75b4b6ee5d760f311399 (diff) | |
| download | bcm5719-llvm-22314179f0660c172514b397060fd8f34b586e82.tar.gz bcm5719-llvm-22314179f0660c172514b397060fd8f34b586e82.zip | |
[test] Split LLDB tests into API, Shell & Unit
LLDB has three major testing strategies: unit tests, tests that exercise
the SB API though dotest.py and what we currently call lit tests. The
later is rather confusing as we're now using lit as the driver for all
three types of tests. As most of this grew organically, the directory
structure in the LLDB repository doesn't really make this clear.
The 'lit' tests are part of the root and among these tests there's a
Unit and Suite folder for the unit and dotest-tests. This layout makes
it impossible to run just the lit tests.
This patch changes the directory layout to match the 3 testing
strategies, each with their own directory and their own configuration
file. This means there are now 3 directories under lit with 3
corresponding targets:
- API (check-lldb-api): Test exercising the SB API.
- Shell (check-lldb-shell): Test exercising command line utilities.
- Unit (check-lldb-unit): Unit tests.
Finally, there's still the `check-lldb` target that runs all three test
suites.
Finally, this also renames the lit folder to `test` to match the LLVM
repository layout.
Differential revision: https://reviews.llvm.org/D68606
llvm-svn: 374184
Diffstat (limited to 'lldb/test/Shell/Register/Inputs/x86-64-read.cpp')
| -rw-r--r-- | lldb/test/Shell/Register/Inputs/x86-64-read.cpp | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/lldb/test/Shell/Register/Inputs/x86-64-read.cpp b/lldb/test/Shell/Register/Inputs/x86-64-read.cpp new file mode 100644 index 00000000000..fb75d7ebd9e --- /dev/null +++ b/lldb/test/Shell/Register/Inputs/x86-64-read.cpp @@ -0,0 +1,57 @@ +#include <cstdint> + +struct alignas(16) xmm_t { + uint64_t a, b; +}; + +int main() { + constexpr uint64_t r8[] = { + 0x0001020304050607, + 0x1011121314151617, + 0x2021222324252627, + 0x3031323334353637, + 0x4041424344454647, + 0x5051525354555657, + 0x6061626364656667, + 0x7071727374757677, + }; + + constexpr xmm_t xmm8[] = { + { 0x0F0E0D0C0B0A0908, 0x1716151413121110, }, + { 0x100F0E0D0C0B0A09, 0x1817161514131211, }, + { 0x11100F0E0D0C0B0A, 0x1918171615141312, }, + { 0x1211100F0E0D0C0B, 0x1A19181716151413, }, + { 0x131211100F0E0D0C, 0x1B1A191817161514, }, + { 0x14131211100F0E0D, 0x1C1B1A1918171615, }, + { 0x1514131211100F0E, 0x1D1C1B1A19181716, }, + { 0x161514131211100F, 0x1E1D1C1B1A191817, }, + }; + + asm volatile( + "movq 0x00(%0), %%r8\n\t" + "movq 0x08(%0), %%r9\n\t" + "movq 0x10(%0), %%r10\n\t" + "movq 0x18(%0), %%r11\n\t" + "movq 0x20(%0), %%r12\n\t" + "movq 0x28(%0), %%r13\n\t" + "movq 0x30(%0), %%r14\n\t" + "movq 0x38(%0), %%r15\n\t" + "\n\t" + "movaps 0x00(%1), %%xmm8\n\t" + "movaps 0x10(%1), %%xmm9\n\t" + "movaps 0x20(%1), %%xmm10\n\t" + "movaps 0x30(%1), %%xmm11\n\t" + "movaps 0x40(%1), %%xmm12\n\t" + "movaps 0x50(%1), %%xmm13\n\t" + "movaps 0x60(%1), %%xmm14\n\t" + "movaps 0x70(%1), %%xmm15\n\t" + "\n\t" + "int3\n\t" + : + : "a"(r8), "b"(xmm8) + : "%r8", "%r9", "%r10", "%r11", "%r12", "%r13", "%r14", "%r15", "%xmm8", + "%xmm9", "%xmm10", "%xmm11", "%xmm12", "%xmm13", "%xmm14", "%xmm15" + ); + + return 0; +} |

