Commit f67ee467 authored by Ng Zhi An's avatar Ng Zhi An Committed by V8 LUCI CQ

[disasm][x64] Remove unnecessary initialization code

These tests don't depend on initializing VM (for Context) or even an
isolate, so we can remove the setup code, and use UNINITIALIZED_TEST
(will not even set up an isolate).

Bug: v8:12207
Change-Id: I4b509b95cc8272db22892c32b53464678403dc7d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3160748Reviewed-by: 's avatarDeepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76854}
parent be526b1e
...@@ -45,7 +45,6 @@ namespace internal { ...@@ -45,7 +45,6 @@ namespace internal {
#define __ assm. #define __ assm.
TEST(DisasmX64) { TEST(DisasmX64) {
CcTest::InitializeVM();
Isolate* isolate = CcTest::i_isolate(); Isolate* isolate = CcTest::i_isolate();
HandleScope scope(isolate); HandleScope scope(isolate);
v8::internal::byte buffer[8192]; v8::internal::byte buffer[8192];
...@@ -1059,10 +1058,7 @@ TEST(DisasmX64) { ...@@ -1059,10 +1058,7 @@ TEST(DisasmX64) {
// Tests that compares the checks the disassembly output with an expected // Tests that compares the checks the disassembly output with an expected
// string. // string.
TEST(DisasmX64CheckOutput) { UNINITIALIZED_TEST(DisasmX64CheckOutput) {
CcTest::InitializeVM();
Isolate* isolate = CcTest::i_isolate();
HandleScope scope(isolate);
v8::internal::byte buffer[8192]; v8::internal::byte buffer[8192];
Assembler assm(AssemblerOptions{}, Assembler assm(AssemblerOptions{},
ExternalAssemblerBuffer(buffer, sizeof buffer)); ExternalAssemblerBuffer(buffer, sizeof buffer));
...@@ -1088,11 +1084,8 @@ TEST(DisasmX64CheckOutput) { ...@@ -1088,11 +1084,8 @@ TEST(DisasmX64CheckOutput) {
addq(rax, Immediate(12345678))); addq(rax, Immediate(12345678)));
} }
TEST(DisasmX64YMMRegister) { UNINITIALIZED_TEST(DisasmX64YMMRegister) {
if (!CpuFeatures::IsSupported(AVX)) return; if (!CpuFeatures::IsSupported(AVX)) return;
CcTest::InitializeVM();
Isolate* isolate = CcTest::i_isolate();
HandleScope scope(isolate);
v8::internal::byte buffer[8192]; v8::internal::byte buffer[8192];
Assembler assm(AssemblerOptions{}, Assembler assm(AssemblerOptions{},
ExternalAssemblerBuffer(buffer, sizeof buffer)); ExternalAssemblerBuffer(buffer, sizeof buffer));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment