OSDN Git Service

Use down_cast instead of reinterpret_cast in Optimizing codegens.
authorRoland Levillain <rpl@google.com>
Mon, 1 Jun 2015 17:24:13 +0000 (18:24 +0100)
committerRoland Levillain <rpl@google.com>
Mon, 1 Jun 2015 17:24:13 +0000 (18:24 +0100)
Change-Id: Ifa23023ffaca631a4f6b5745dd7492c39521a26f

compiler/optimizing/code_generator_arm.cc
compiler/optimizing/code_generator_x86.cc
compiler/optimizing/code_generator_x86_64.cc

index 7f0be05..987a6c4 100644 (file)
@@ -55,7 +55,7 @@ static constexpr SRegister kFpuCalleeSaves[] =
 // S registers. Therefore there is no need to block it.
 static constexpr DRegister DTMP = D31;
 
-#define __ reinterpret_cast<ArmAssembler*>(codegen->GetAssembler())->
+#define __ down_cast<ArmAssembler*>(codegen->GetAssembler())->
 #define QUICK_ENTRY_POINT(x) QUICK_ENTRYPOINT_OFFSET(kArmWordSize, x).Int32Value()
 
 class NullCheckSlowPathARM : public SlowPathCodeARM {
@@ -318,7 +318,7 @@ class DeoptimizationSlowPathARM : public SlowPathCodeARM {
 #undef __
 
 #undef __
-#define __ reinterpret_cast<ArmAssembler*>(GetAssembler())->
+#define __ down_cast<ArmAssembler*>(GetAssembler())->
 
 inline Condition ARMCondition(IfCondition cond) {
   switch (cond) {
index 8678428..f63a5d2 100644 (file)
@@ -44,7 +44,7 @@ static constexpr int kC2ConditionMask = 0x400;
 
 static constexpr int kFakeReturnRegister = Register(8);
 
-#define __ reinterpret_cast<X86Assembler*>(codegen->GetAssembler())->
+#define __ down_cast<X86Assembler*>(codegen->GetAssembler())->
 
 class NullCheckSlowPathX86 : public SlowPathCodeX86 {
  public:
@@ -324,7 +324,7 @@ class DeoptimizationSlowPathX86 : public SlowPathCodeX86 {
 };
 
 #undef __
-#define __ reinterpret_cast<X86Assembler*>(GetAssembler())->
+#define __ down_cast<X86Assembler*>(GetAssembler())->
 
 inline Condition X86Condition(IfCondition cond) {
   switch (cond) {
index 78d5851..ca9a154 100644 (file)
@@ -46,7 +46,7 @@ static constexpr FloatRegister kFpuCalleeSaves[] = { XMM12, XMM13, XMM14, XMM15
 
 static constexpr int kC2ConditionMask = 0x400;
 
-#define __ reinterpret_cast<X86_64Assembler*>(codegen->GetAssembler())->
+#define __ down_cast<X86_64Assembler*>(codegen->GetAssembler())->
 
 class NullCheckSlowPathX86_64 : public SlowPathCodeX86_64 {
  public:
@@ -343,7 +343,7 @@ class DeoptimizationSlowPathX86_64 : public SlowPathCodeX86_64 {
 };
 
 #undef __
-#define __ reinterpret_cast<X86_64Assembler*>(GetAssembler())->
+#define __ down_cast<X86_64Assembler*>(GetAssembler())->
 
 inline Condition X86_64Condition(IfCondition cond) {
   switch (cond) {