mirror of
https://github.com/dart-lang/sdk
synced 2024-09-05 16:41:07 +00:00
[vm] Fixes for gcc build
This change fixes the following build errors when building Dart VM with gcc: ../../runtime/vm/compiler/assembler/assembler_arm64.h: In member function ‘uint32_t dart::compiler::Address::encoding(dart::compiler::OperandSize) const’: ../../runtime/vm/compiler/assembler/assembler_arm64.h:355:3: error: control reaches end of non-void function [-Werror=return-type] 355 | } ../../runtime/vm/compiler/assembler/assembler_arm64.cc: In member function ‘void dart::compiler::Assembler::PopNativeCalleeSavedRegisters()’: ../../runtime/vm/compiler/assembler/assembler_arm64.cc:2380:52: error: bitwise comparison always evaluates to false [-Werror=tautological-compare] 2380 | bool pop_single = (kAbiPreservedFpuRegCount & 1) == 1; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^~ ~ ../../runtime/vm/compiler/assembler/assembler_arm64.cc:2400:47: error: bitwise comparison always evaluates to false [-Werror=tautological-compare] 2400 | pop_single = (kAbiPreservedCpuRegCount & 1) == 1; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^~ ~ TEST=ci Change-Id: Ib44790dbe99288f569a26e4df28f61ef2aa40ea3 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260640 Reviewed-by: Ryan Macnak <rmacnak@google.com> Commit-Queue: Alexander Markov <alexmarkov@google.com>
This commit is contained in:
parent
c1e43135ad
commit
241e70669b
|
@ -2377,7 +2377,7 @@ void Assembler::PushNativeCalleeSavedRegisters() {
|
|||
|
||||
void Assembler::PopNativeCalleeSavedRegisters() {
|
||||
// Restore the bottom 64-bits of callee-saved V registers.
|
||||
bool pop_single = (kAbiPreservedFpuRegCount & 1) == 1;
|
||||
bool pop_single = (kAbiPreservedFpuRegCount & 1) != 0;
|
||||
VRegister vprev = kNoVRegister;
|
||||
for (int i = kAbiLastPreservedFpuReg; i >= kAbiFirstPreservedFpuReg; i--) {
|
||||
const VRegister r = static_cast<VRegister>(i);
|
||||
|
@ -2397,7 +2397,7 @@ void Assembler::PopNativeCalleeSavedRegisters() {
|
|||
// register when it is not holding a pool-pointer since we are returning to
|
||||
// C++ code. We also skip the dart stack pointer SP, since we are still
|
||||
// using it as the stack pointer.
|
||||
pop_single = (kAbiPreservedCpuRegCount & 1) == 1;
|
||||
pop_single = (kAbiPreservedCpuRegCount & 1) != 0;
|
||||
Register prev = kNoRegister;
|
||||
for (int i = kAbiLastPreservedCpuReg; i >= kAbiFirstPreservedCpuReg; i--) {
|
||||
Register r = static_cast<Register>(i);
|
||||
|
|
|
@ -351,6 +351,7 @@ class Address : public ValueObject {
|
|||
case Unknown:
|
||||
UNREACHABLE();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
AddressType type() const { return type_; }
|
||||
|
|
Loading…
Reference in a new issue