mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-19 08:15:31 +00:00
Bug 1640829 part 1 - Add some missing branchTestSymbol and unboxInt32/unboxBoolean overloads. r=iain
Differential Revision: https://phabricator.services.mozilla.com/D76827
This commit is contained in:
parent
5fa2c88aaa
commit
319bac0dc9
@ -1567,6 +1567,8 @@ class MacroAssembler : public MacroAssemblerSpecific {
|
||||
Label* label)
|
||||
DEFINED_ON(arm, arm64, mips32, mips64, x86_shared);
|
||||
|
||||
inline void branchTestSymbol(Condition cond, const Address& address,
|
||||
Label* label) PER_SHARED_ARCH;
|
||||
inline void branchTestSymbol(Condition cond, const BaseIndex& address,
|
||||
Label* label) PER_SHARED_ARCH;
|
||||
inline void branchTestSymbol(Condition cond, const ValueOperand& value,
|
||||
|
@ -1728,6 +1728,11 @@ void MacroAssembler::branchTestSymbol(Condition cond, Register tag,
|
||||
branchTestSymbolImpl(cond, tag, label);
|
||||
}
|
||||
|
||||
void MacroAssembler::branchTestSymbol(Condition cond, const Address& address,
|
||||
Label* label) {
|
||||
branchTestSymbolImpl(cond, address, label);
|
||||
}
|
||||
|
||||
void MacroAssembler::branchTestSymbol(Condition cond, const BaseIndex& address,
|
||||
Label* label) {
|
||||
branchTestSymbolImpl(cond, address, label);
|
||||
|
@ -827,12 +827,18 @@ class MacroAssemblerARMCompat : public MacroAssemblerARM {
|
||||
void unboxInt32(const Address& src, Register dest) {
|
||||
unboxNonDouble(src, dest, JSVAL_TYPE_INT32);
|
||||
}
|
||||
void unboxInt32(const BaseIndex& src, Register dest) {
|
||||
unboxNonDouble(src, dest, JSVAL_TYPE_INT32);
|
||||
}
|
||||
void unboxBoolean(const ValueOperand& src, Register dest) {
|
||||
unboxNonDouble(src, dest, JSVAL_TYPE_BOOLEAN);
|
||||
}
|
||||
void unboxBoolean(const Address& src, Register dest) {
|
||||
unboxNonDouble(src, dest, JSVAL_TYPE_BOOLEAN);
|
||||
}
|
||||
void unboxBoolean(const BaseIndex& src, Register dest) {
|
||||
unboxNonDouble(src, dest, JSVAL_TYPE_BOOLEAN);
|
||||
}
|
||||
void unboxString(const ValueOperand& src, Register dest) {
|
||||
unboxNonDouble(src, dest, JSVAL_TYPE_STRING);
|
||||
}
|
||||
|
@ -1441,6 +1441,11 @@ void MacroAssembler::branchTestSymbol(Condition cond, Register tag,
|
||||
branchTestSymbolImpl(cond, tag, label);
|
||||
}
|
||||
|
||||
void MacroAssembler::branchTestSymbol(Condition cond, const Address& address,
|
||||
Label* label) {
|
||||
branchTestSymbolImpl(cond, address, label);
|
||||
}
|
||||
|
||||
void MacroAssembler::branchTestSymbol(Condition cond, const BaseIndex& address,
|
||||
Label* label) {
|
||||
branchTestSymbolImpl(cond, address, label);
|
||||
|
@ -1343,6 +1343,7 @@ class MacroAssemblerCompat : public vixl::MacroAssembler {
|
||||
move32(src.valueReg(), dest);
|
||||
}
|
||||
void unboxInt32(const Address& src, Register dest) { load32(src, dest); }
|
||||
void unboxInt32(const BaseIndex& src, Register dest) { load32(src, dest); }
|
||||
|
||||
template <typename T>
|
||||
void unboxDouble(const T& src, FloatRegister dest) {
|
||||
@ -1363,6 +1364,7 @@ class MacroAssemblerCompat : public vixl::MacroAssembler {
|
||||
move32(src.valueReg(), dest);
|
||||
}
|
||||
void unboxBoolean(const Address& src, Register dest) { load32(src, dest); }
|
||||
void unboxBoolean(const BaseIndex& src, Register dest) { load32(src, dest); }
|
||||
|
||||
void unboxMagic(const ValueOperand& src, Register dest) {
|
||||
move32(src.valueReg(), dest);
|
||||
|
@ -725,6 +725,9 @@ class MacroAssemblerX64 : public MacroAssemblerX86Shared {
|
||||
void unboxInt32(const Address& src, Register dest) {
|
||||
unboxInt32(Operand(src), dest);
|
||||
}
|
||||
void unboxInt32(const BaseIndex& src, Register dest) {
|
||||
unboxInt32(Operand(src), dest);
|
||||
}
|
||||
template <typename T>
|
||||
void unboxDouble(const T& src, FloatRegister dest) {
|
||||
loadDouble(Operand(src), dest);
|
||||
@ -747,6 +750,9 @@ class MacroAssemblerX64 : public MacroAssemblerX86Shared {
|
||||
void unboxBoolean(const Address& src, Register dest) {
|
||||
unboxBoolean(Operand(src), dest);
|
||||
}
|
||||
void unboxBoolean(const BaseIndex& src, Register dest) {
|
||||
unboxBoolean(Operand(src), dest);
|
||||
}
|
||||
|
||||
void unboxMagic(const ValueOperand& src, Register dest) {
|
||||
movl(src.valueReg(), dest);
|
||||
|
@ -814,6 +814,11 @@ void MacroAssembler::branchTestSymbol(Condition cond, Register tag,
|
||||
branchTestSymbolImpl(cond, tag, label);
|
||||
}
|
||||
|
||||
void MacroAssembler::branchTestSymbol(Condition cond, const Address& address,
|
||||
Label* label) {
|
||||
branchTestSymbolImpl(cond, address, label);
|
||||
}
|
||||
|
||||
void MacroAssembler::branchTestSymbol(Condition cond, const BaseIndex& address,
|
||||
Label* label) {
|
||||
branchTestSymbolImpl(cond, address, label);
|
||||
|
@ -480,6 +480,11 @@ class MacroAssemblerX86 : public MacroAssemblerX86Shared {
|
||||
cmp32(tagOf(address), ImmTag(JSVAL_TAG_STRING));
|
||||
return cond;
|
||||
}
|
||||
Condition testSymbol(Condition cond, const Address& address) {
|
||||
MOZ_ASSERT(cond == Equal || cond == NotEqual);
|
||||
cmp32(tagOf(address), ImmTag(JSVAL_TAG_SYMBOL));
|
||||
return cond;
|
||||
}
|
||||
Condition testSymbol(Condition cond, const BaseIndex& address) {
|
||||
MOZ_ASSERT(cond == Equal || cond == NotEqual);
|
||||
cmp32(tagOf(address), ImmTag(JSVAL_TAG_SYMBOL));
|
||||
@ -742,12 +747,18 @@ class MacroAssemblerX86 : public MacroAssemblerX86Shared {
|
||||
void unboxInt32(const Address& src, Register dest) {
|
||||
unboxNonDouble(src, dest, JSVAL_TYPE_INT32);
|
||||
}
|
||||
void unboxInt32(const BaseIndex& src, Register dest) {
|
||||
unboxNonDouble(src, dest, JSVAL_TYPE_INT32);
|
||||
}
|
||||
void unboxBoolean(const ValueOperand& src, Register dest) {
|
||||
unboxNonDouble(src, dest, JSVAL_TYPE_BOOLEAN);
|
||||
}
|
||||
void unboxBoolean(const Address& src, Register dest) {
|
||||
unboxNonDouble(src, dest, JSVAL_TYPE_BOOLEAN);
|
||||
}
|
||||
void unboxBoolean(const BaseIndex& src, Register dest) {
|
||||
unboxNonDouble(src, dest, JSVAL_TYPE_BOOLEAN);
|
||||
}
|
||||
void unboxString(const ValueOperand& src, Register dest) {
|
||||
unboxNonDouble(src, dest, JSVAL_TYPE_STRING);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user