Bug 1152661 - Fix -Wuninitialized warnings about Operand member variables. r=jandem

This commit is contained in:
Chris Peterson 2015-04-08 22:37:04 -07:00
Родитель ab82622390
Коммит e80951df1f
1 изменённых файлов: 18 добавлений и 2 удалений

Просмотреть файл

@ -36,15 +36,23 @@ class Operand
public:
explicit Operand(Register reg)
: kind_(REG),
base_(reg.code())
base_(reg.code()),
scale_(TimesOne),
index_(0),
disp_(0)
{ }
explicit Operand(FloatRegister reg)
: kind_(FPREG),
base_(reg.encoding())
base_(reg.encoding()),
scale_(TimesOne),
index_(0),
disp_(0)
{ }
explicit Operand(const Address& address)
: kind_(MEM_REG_DISP),
base_(address.base.code()),
scale_(TimesOne),
index_(0),
disp_(address.offset)
{ }
explicit Operand(const BaseIndex& address)
@ -64,14 +72,22 @@ class Operand
Operand(Register reg, int32_t disp)
: kind_(MEM_REG_DISP),
base_(reg.code()),
scale_(TimesOne),
index_(0),
disp_(disp)
{ }
explicit Operand(AbsoluteAddress address)
: kind_(MEM_ADDRESS32),
base_(Registers::Invalid),
scale_(TimesOne),
index_(0),
disp_(X86Encoding::AddressImmediate(address.addr))
{ }
explicit Operand(PatchedAbsoluteAddress address)
: kind_(MEM_ADDRESS32),
base_(Registers::Invalid),
scale_(TimesOne),
index_(0),
disp_(X86Encoding::AddressImmediate(address.addr))
{ }