Commit 72e29f5c authored by Michael Achenbach's avatar Michael Achenbach Committed by Commit Bot

Revert "[builtins] Fix union initialization"

This reverts commit 0d14ad57.

Reason for revert: Seems to add a static initializer:
https://build.chromium.org/p/client.v8/builders/V8%20Linux/builds/19779

Original change's description:
> [builtins] Fix union initialization
> 
> Fix d4c157ee commit
> 
> On big endian platforms wrong byte is being read when accessing
> "parameter_count" field of union, in function
> failing on MIPS big endian platforms.
> 
> Builtins: :GetStackParameterCount. It is the reason of several tests
> Bug: 
> Change-Id: Ia21aba80a89215022ee218d27552b5b4ea18a0db
> Reviewed-on: https://chromium-review.googlesource.com/603808
> Commit-Queue: Ivica Bogosavljevic <ivica.bogosavljevic@imgtec.com>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#47330}

TBR=jkummerow@chromium.org,jarin@chromium.org,jgruber@chromium.org,predrag.rudic@imgtec.com,ivica.bogosavljevic@imgtec.com

Change-Id: I596bb1a04c72c8f5cb4f7b4a8e9161bd5889683d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/612287Reviewed-by: 's avatarMichael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47331}
parent 0d14ad57
......@@ -26,11 +26,7 @@ namespace {
struct BuiltinMetadata {
const char* name;
Builtins::Kind kind;
union KindSpecificData {
KindSpecificData(Address cpp_entry) : cpp_entry(cpp_entry) {}
KindSpecificData(int8_t parameter_count)
: parameter_count(parameter_count) {}
KindSpecificData() = default;
union {
Address cpp_entry; // For CPP and API builtins.
int8_t parameter_count; // For TFJ builtins.
} kind_specific_data;
......@@ -42,7 +38,7 @@ struct BuiltinMetadata {
#define DECL_API(Name, ...) { #Name, Builtins::API, \
{ FUNCTION_ADDR(Builtin_##Name) }},
#define DECL_TFJ(Name, Count, ...) { #Name, Builtins::TFJ, \
{ static_cast<int8_t>(Count) }},
{ reinterpret_cast<Address>(Count) }},
#define DECL_TFC(Name, ...) { #Name, Builtins::TFC, {} },
#define DECL_TFS(Name, ...) { #Name, Builtins::TFS, {} },
#define DECL_TFH(Name, ...) { #Name, Builtins::TFH, {} },
......
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