[lldb] Revive TestBasicEntryValuesX86_64
authorPavel Labath <pavel@labath.sk>
Wed, 6 May 2020 14:06:42 +0000 (16:06 +0200)
committerPavel Labath <pavel@labath.sk>
Mon, 11 May 2020 14:31:02 +0000 (16:31 +0200)
commita5c23179826a6dc4f26a4f3fcda66290bc04a201
treebea8a84eed9c332376c784aa4d23e8a70d69d997
parentec2d93c7d7b00374535cb3d6658abec4b150f6f6
[lldb] Revive TestBasicEntryValuesX86_64

Summary:
This function rewrites the test to be (hopefully) less susceptible to
codegen changes and re-enables it.

The most interesting changes are:
- use an __attribute__((optnone)) function instead of a volatile asm to
  "use" a value. This isn't strictly necessary, but it makes the
  function simpler while achieving the same effect.
- use a call to a function with the exact same signature instead of a
  volatile asm to "destroy" arguments. This makes the independent of the
  ABI, and (together with avoiding the usage of the arguments after the
  call) ensures that the compiler has no reason to move the argument
  from its initial register (previously we needed to guess where will
  the compiler store the arguments).

Reviewers: vsk, djtodoro, dblaikie

Subscribers: lldb-commits

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D79491
lldb/test/API/functionalities/param_entry_vals/basic_entry_values/Makefile [moved from lldb/test/API/functionalities/param_entry_vals/basic_entry_values_x86_64/Makefile with 100% similarity]
lldb/test/API/functionalities/param_entry_vals/basic_entry_values/TestBasicEntryValues.py [new file with mode: 0644]
lldb/test/API/functionalities/param_entry_vals/basic_entry_values/main.cpp [new file with mode: 0644]
lldb/test/API/functionalities/param_entry_vals/basic_entry_values_x86_64/TestBasicEntryValuesX86_64.py [deleted file]
lldb/test/API/functionalities/param_entry_vals/basic_entry_values_x86_64/main.cpp [deleted file]