зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1152661 - Fix -Wuninitialized warnings about Operand member variables. r=jandem
This commit is contained in:
Родитель
d7cdaaccb9
Коммит
49d205d7b2
|
@ -29,7 +29,7 @@ class Operand
|
|||
private:
|
||||
Kind kind_ : 4;
|
||||
// Used as a Register::Encoding and a FloatRegister::Encoding.
|
||||
int32_t base_ : 5;
|
||||
uint32_t base_ : 5;
|
||||
Scale scale_ : 3;
|
||||
Register::Encoding index_ : 5;
|
||||
int32_t disp_;
|
||||
|
@ -37,15 +37,23 @@ class Operand
|
|||
public:
|
||||
explicit Operand(Register reg)
|
||||
: kind_(REG),
|
||||
base_(reg.encoding())
|
||||
base_(reg.encoding()),
|
||||
scale_(TimesOne),
|
||||
index_(Registers::Invalid),
|
||||
disp_(0)
|
||||
{ }
|
||||
explicit Operand(FloatRegister reg)
|
||||
: kind_(FPREG),
|
||||
base_(reg.encoding())
|
||||
base_(reg.encoding()),
|
||||
scale_(TimesOne),
|
||||
index_(Registers::Invalid),
|
||||
disp_(0)
|
||||
{ }
|
||||
explicit Operand(const Address& address)
|
||||
: kind_(MEM_REG_DISP),
|
||||
base_(address.base.encoding()),
|
||||
scale_(TimesOne),
|
||||
index_(Registers::Invalid),
|
||||
disp_(address.offset)
|
||||
{ }
|
||||
explicit Operand(const BaseIndex& address)
|
||||
|
@ -65,14 +73,22 @@ class Operand
|
|||
Operand(Register reg, int32_t disp)
|
||||
: kind_(MEM_REG_DISP),
|
||||
base_(reg.encoding()),
|
||||
scale_(TimesOne),
|
||||
index_(Registers::Invalid),
|
||||
disp_(disp)
|
||||
{ }
|
||||
explicit Operand(AbsoluteAddress address)
|
||||
: kind_(MEM_ADDRESS32),
|
||||
base_(Registers::Invalid),
|
||||
scale_(TimesOne),
|
||||
index_(Registers::Invalid),
|
||||
disp_(X86Encoding::AddressImmediate(address.addr))
|
||||
{ }
|
||||
explicit Operand(PatchedAbsoluteAddress address)
|
||||
: kind_(MEM_ADDRESS32),
|
||||
base_(Registers::Invalid),
|
||||
scale_(TimesOne),
|
||||
index_(Registers::Invalid),
|
||||
disp_(X86Encoding::AddressImmediate(address.addr))
|
||||
{ }
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче