Bug 1125202 - SpiderMonkey: Remove redundant inline keywords r=jandem

This commit is contained in:
Dan Gohman 2015-01-30 16:05:55 -08:00
Родитель a868198b17
Коммит 4cec506032
1 изменённых файлов: 9 добавлений и 9 удалений

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

@ -470,7 +470,7 @@ private:
}; };
// Test whether the given opcode should be printed with its operands reversed. // Test whether the given opcode should be printed with its operands reversed.
static inline bool IsXMMReversedOperands(TwoByteOpcodeID opcode) { static bool IsXMMReversedOperands(TwoByteOpcodeID opcode) {
switch (opcode) { switch (opcode) {
case OP2_MOVSD_WsdVsd: // also OP2_MOVPS_WpsVps case OP2_MOVSD_WsdVsd: // also OP2_MOVPS_WpsVps
case OP2_MOVAPS_WsdVsd: case OP2_MOVAPS_WsdVsd:
@ -5294,19 +5294,19 @@ private:
static const RegisterID hasSib2 = X86Registers::r12; static const RegisterID hasSib2 = X86Registers::r12;
// Registers r8 & above require a REX prefixe. // Registers r8 & above require a REX prefixe.
inline bool regRequiresRex(int reg) bool regRequiresRex(int reg)
{ {
return (reg >= X86Registers::r8); return (reg >= X86Registers::r8);
} }
// Format a REX prefix byte. // Format a REX prefix byte.
inline void emitRex(bool w, int r, int x, int b) void emitRex(bool w, int r, int x, int b)
{ {
m_buffer.putByteUnchecked(PRE_REX | ((int)w << 3) | ((r>>3)<<2) | ((x>>3)<<1) | (b>>3)); m_buffer.putByteUnchecked(PRE_REX | ((int)w << 3) | ((r>>3)<<2) | ((x>>3)<<1) | (b>>3));
} }
// Used to plant a REX byte with REX.w set (for 64-bit operations). // Used to plant a REX byte with REX.w set (for 64-bit operations).
inline void emitRexW(int r, int x, int b) void emitRexW(int r, int x, int b)
{ {
emitRex(true, r, x, b); emitRex(true, r, x, b);
} }
@ -5318,7 +5318,7 @@ private:
// NB: WebKit's use of emitRexIf() is limited such that the // NB: WebKit's use of emitRexIf() is limited such that the
// reqRequiresRex() checks are not needed. SpiderMonkey extends // reqRequiresRex() checks are not needed. SpiderMonkey extends
// oneByteOp8 functionality such that r, x, and b can all be used. // oneByteOp8 functionality such that r, x, and b can all be used.
inline void emitRexIf(bool condition, int r, int x, int b) void emitRexIf(bool condition, int r, int x, int b)
{ {
if (condition || regRequiresRex(r) || regRequiresRex(x) || regRequiresRex(b)) if (condition || regRequiresRex(r) || regRequiresRex(x) || regRequiresRex(b))
emitRex(false, r, x, b); emitRex(false, r, x, b);
@ -5326,18 +5326,18 @@ private:
// Used for word sized operations, will plant a REX prefix if necessary // Used for word sized operations, will plant a REX prefix if necessary
// (if any register is r8 or above). // (if any register is r8 or above).
inline void emitRexIfNeeded(int r, int x, int b) void emitRexIfNeeded(int r, int x, int b)
{ {
emitRexIf(regRequiresRex(r) || regRequiresRex(x) || regRequiresRex(b), r, x, b); emitRexIf(regRequiresRex(r) || regRequiresRex(x) || regRequiresRex(b), r, x, b);
} }
#else #else
// No REX prefix bytes on 32-bit x86. // No REX prefix bytes on 32-bit x86.
inline bool regRequiresRex(int) { return false; } bool regRequiresRex(int) { return false; }
inline void emitRexIf(bool condition, int, int, int) void emitRexIf(bool condition, int, int, int)
{ {
MOZ_ASSERT(!condition, "32-bit x86 should never use a REX prefix"); MOZ_ASSERT(!condition, "32-bit x86 should never use a REX prefix");
} }
inline void emitRexIfNeeded(int, int, int) {} void emitRexIfNeeded(int, int, int) {}
#endif #endif
enum ModRmMode { enum ModRmMode {