Index: src/a64/instructions-a64.h |
diff --git a/src/a64/instructions-a64.h b/src/a64/instructions-a64.h |
index f4bdbbf554bc2b27dae1bea9ff94b38e7e3df6cd..ccab39e3ac84e18f4c85b35cce2abdf171e78b40 100644 |
--- a/src/a64/instructions-a64.h |
+++ b/src/a64/instructions-a64.h |
@@ -119,14 +119,12 @@ enum Reg31Mode { |
class Instruction { |
public: |
- Instr InstructionBits() const { |
- Instr bits; |
- memcpy(&bits, this, sizeof(bits)); |
- return bits; |
+ V8_INLINE Instr InstructionBits() const { |
+ return *reinterpret_cast<const Instr*>(this); |
} |
- void SetInstructionBits(Instr new_instr) { |
- memcpy(this, &new_instr, sizeof(new_instr)); |
+ V8_INLINE void SetInstructionBits(Instr new_instr) { |
+ *reinterpret_cast<Instr*>(this) = new_instr; |
} |
int Bit(int pos) const { |
@@ -369,28 +367,6 @@ class Instruction { |
return reinterpret_cast<uint8_t*>(this) + offset; |
} |
- uint32_t Literal32() { |
- uint32_t literal; |
- memcpy(&literal, LiteralAddress(), sizeof(literal)); |
- |
- return literal; |
- } |
- |
- uint64_t Literal64() { |
- uint64_t literal; |
- memcpy(&literal, LiteralAddress(), sizeof(literal)); |
- |
- return literal; |
- } |
- |
- float LiteralFP32() { |
- return rawbits_to_float(Literal32()); |
- } |
- |
- double LiteralFP64() { |
- return rawbits_to_double(Literal64()); |
- } |
- |
Instruction* NextInstruction() { |
return this + kInstructionSize; |
} |