diff options
author | Mathieu Chartier <mathieuc@google.com> | 2015-04-21 16:50:40 -0700 |
---|---|---|
committer | Mathieu Chartier <mathieuc@google.com> | 2015-04-22 12:44:27 -0700 |
commit | 2cebb24bfc3247d3e9be138a3350106737455918 (patch) | |
tree | d04d27d21b3c7733d784e303f01f873bb99e7770 /runtime/arch/x86_64 | |
parent | 1f02f1a7b3073b8fef07770a67fbf94afad317f0 (diff) | |
download | art-2cebb24bfc3247d3e9be138a3350106737455918.tar.gz art-2cebb24bfc3247d3e9be138a3350106737455918.tar.bz2 art-2cebb24bfc3247d3e9be138a3350106737455918.zip |
Replace NULL with nullptr
Also fixed some lines that were too long, and a few other minor
details.
Change-Id: I6efba5fb6e03eb5d0a300fddb2a75bf8e2f175cb
Diffstat (limited to 'runtime/arch/x86_64')
-rw-r--r-- | runtime/arch/x86_64/context_x86_64.h | 2 | ||||
-rw-r--r-- | runtime/arch/x86_64/entrypoints_init_x86_64.cc | 27 | ||||
-rw-r--r-- | runtime/arch/x86_64/quick_entrypoints_x86_64.S | 10 |
3 files changed, 16 insertions, 23 deletions
diff --git a/runtime/arch/x86_64/context_x86_64.h b/runtime/arch/x86_64/context_x86_64.h index d03aa45237..c9b0ff6b72 100644 --- a/runtime/arch/x86_64/context_x86_64.h +++ b/runtime/arch/x86_64/context_x86_64.h @@ -79,7 +79,7 @@ class X86_64Context : public Context { NO_RETURN void DoLongJump() OVERRIDE; private: - // Pointers to register locations. Values are initialized to NULL or the special registers below. + // Pointers to register locations. Values are initialized to null or the special registers below. uintptr_t* gprs_[kNumberOfCpuRegisters]; uint64_t* fprs_[kNumberOfFloatRegisters]; // Hold values for rsp and rip if they are not located within a stack frame. RIP is somewhat diff --git a/runtime/arch/x86_64/entrypoints_init_x86_64.cc b/runtime/arch/x86_64/entrypoints_init_x86_64.cc index 3bc0dc41bd..0cddec4102 100644 --- a/runtime/arch/x86_64/entrypoints_init_x86_64.cc +++ b/runtime/arch/x86_64/entrypoints_init_x86_64.cc @@ -101,17 +101,6 @@ void InitEntryPoints(InterpreterEntryPoints* ipoints, JniEntryPoints* jpoints, qpoints->pUnlockObject = art_quick_unlock_object; // Math - // points->pCmpgDouble = NULL; // Not needed on x86. - // points->pCmpgFloat = NULL; // Not needed on x86. - // points->pCmplDouble = NULL; // Not needed on x86. - // points->pCmplFloat = NULL; // Not needed on x86. - // qpoints->pFmod = NULL; // Not needed on x86. - // qpoints->pL2d = NULL; // Not needed on x86. - // qpoints->pFmodf = NULL; // Not needed on x86. - // qpoints->pL2f = NULL; // Not needed on x86. - // points->pD2iz = NULL; // Not needed on x86. - // points->pF2iz = NULL; // Not needed on x86. - // qpoints->pIdivmod = NULL; // Not needed on x86. qpoints->pD2l = art_d2l; qpoints->pF2l = art_f2l; qpoints->pLdiv = art_quick_ldiv; @@ -122,7 +111,6 @@ void InitEntryPoints(InterpreterEntryPoints* ipoints, JniEntryPoints* jpoints, qpoints->pUshrLong = art_quick_lushr; // Intrinsics - // qpoints->pIndexOf = NULL; // Not needed on x86. qpoints->pStringCompareTo = art_quick_string_compareto; qpoints->pMemcpy = art_quick_memcpy; @@ -130,11 +118,16 @@ void InitEntryPoints(InterpreterEntryPoints* ipoints, JniEntryPoints* jpoints, qpoints->pQuickImtConflictTrampoline = art_quick_imt_conflict_trampoline; qpoints->pQuickResolutionTrampoline = art_quick_resolution_trampoline; qpoints->pQuickToInterpreterBridge = art_quick_to_interpreter_bridge; - qpoints->pInvokeDirectTrampolineWithAccessCheck = art_quick_invoke_direct_trampoline_with_access_check; - qpoints->pInvokeInterfaceTrampolineWithAccessCheck = art_quick_invoke_interface_trampoline_with_access_check; - qpoints->pInvokeStaticTrampolineWithAccessCheck = art_quick_invoke_static_trampoline_with_access_check; - qpoints->pInvokeSuperTrampolineWithAccessCheck = art_quick_invoke_super_trampoline_with_access_check; - qpoints->pInvokeVirtualTrampolineWithAccessCheck = art_quick_invoke_virtual_trampoline_with_access_check; + qpoints->pInvokeDirectTrampolineWithAccessCheck = + art_quick_invoke_direct_trampoline_with_access_check; + qpoints->pInvokeInterfaceTrampolineWithAccessCheck = + art_quick_invoke_interface_trampoline_with_access_check; + qpoints->pInvokeStaticTrampolineWithAccessCheck = + art_quick_invoke_static_trampoline_with_access_check; + qpoints->pInvokeSuperTrampolineWithAccessCheck = + art_quick_invoke_super_trampoline_with_access_check; + qpoints->pInvokeVirtualTrampolineWithAccessCheck = + art_quick_invoke_virtual_trampoline_with_access_check; // Thread qpoints->pTestSuspend = art_quick_test_suspend; diff --git a/runtime/arch/x86_64/quick_entrypoints_x86_64.S b/runtime/arch/x86_64/quick_entrypoints_x86_64.S index ce21f01cfa..8185deb9e2 100644 --- a/runtime/arch/x86_64/quick_entrypoints_x86_64.S +++ b/runtime/arch/x86_64/quick_entrypoints_x86_64.S @@ -348,7 +348,7 @@ TWO_ARG_RUNTIME_EXCEPTION art_quick_throw_array_bounds, artThrowArrayBoundsFromC * The helper will attempt to locate the target and return a 128-bit result in rax/rdx consisting * of the target Method* in rax and method->code_ in rdx. * - * If unsuccessful, the helper will return NULL/????. There will be a pending exception in the + * If unsuccessful, the helper will return null/????. There will be a pending exception in the * thread and we branch to another stub to deliver it. * * On success this wrapper will restore arguments and *jump* to the target, leaving the return @@ -506,7 +506,7 @@ DEFINE_FUNCTION art_quick_invoke_stub #if (STACK_REFERENCE_SIZE != 4) #error "STACK_REFERENCE_SIZE(X86_64) size not as expected." #endif - movl LITERAL(0), (%rsp) // Store NULL for method* + movl LITERAL(0), (%rsp) // Store null for method* movl %r10d, %ecx // Place size of args in rcx. movq %rdi, %rax // rax := method to be called @@ -554,7 +554,7 @@ END_FUNCTION art_quick_invoke_stub * On entry: * [sp] = return address * rdi = method pointer - * rsi = argument array or NULL if no arguments. + * rsi = argument array or null if no arguments. * rdx = size of argument array in bytes * rcx = (managed) thread pointer * r8 = JValue* result @@ -600,7 +600,7 @@ DEFINE_FUNCTION art_quick_invoke_static_stub #if (STACK_REFERENCE_SIZE != 4) #error "STACK_REFERENCE_SIZE(X86_64) size not as expected." #endif - movl LITERAL(0), (%rsp) // Store NULL for method* + movl LITERAL(0), (%rsp) // Store null for method* movl %r10d, %ecx // Place size of args in rcx. movq %rdi, %rax // rax := method to be called @@ -1302,7 +1302,7 @@ DEFINE_FUNCTION art_quick_resolution_trampoline movq %rax, %r10 // Remember returned code pointer in R10. movq (%rsp), %rdi // Load called method into RDI. RESTORE_REFS_AND_ARGS_CALLEE_SAVE_FRAME - testq %r10, %r10 // If code pointer is NULL goto deliver pending exception. + testq %r10, %r10 // If code pointer is null goto deliver pending exception. jz 1f jmp *%r10 // Tail call into method. 1: |