Skip to content

Commit

Permalink
MIPS64: Fix declaration for bit() function.
Browse files Browse the repository at this point in the history
From declarations of bit() member functions (for structures Register,
FPURegister and FPUControlRegister) are removed constexpr specificators.

Build V8 will fail if function bit() is declared as a constant
expression.

TEST=
BUG=

Review-Url: https://codereview.chromium.org/2737143002
Cr-Commit-Position: refs/heads/master@{#43674}
  • Loading branch information
Ilija.Pavlovic authored and Commit bot committed Mar 8, 2017
1 parent 65a07b7 commit 92da406
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions src/mips64/assembler-mips64.h
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,10 @@ struct Register {
DCHECK(is_valid());
return reg_code;
}
constexpr int bit() const { return DCHECK(is_valid()), 1 << reg_code; }
int bit() const {
DCHECK(is_valid());
return 1 << reg_code;
}

// Unfortunately we can't make this private in a struct.
int reg_code;
Expand Down Expand Up @@ -196,7 +199,11 @@ struct FPURegister {
DCHECK(is_valid());
return reg_code;
}
constexpr int bit() const { return DCHECK(is_valid()), 1 << reg_code; }

int bit() const {
DCHECK(is_valid());
return 1 << reg_code;
}

static FPURegister from_code(int code) {
FPURegister r = {code};
Expand Down Expand Up @@ -287,7 +294,10 @@ struct FPUControlRegister {
DCHECK(is_valid());
return reg_code;
}
constexpr int bit() const { return DCHECK(is_valid()), 1 << reg_code; }
int bit() const {
DCHECK(is_valid());
return 1 << reg_code;
}
void setcode(int f) {
reg_code = f;
DCHECK(is_valid());
Expand Down

0 comments on commit 92da406

Please sign in to comment.