Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(22)

Side by Side Diff: src/arm64/simulator-arm64.cc

Issue 1173343006: Replace OFFSET_OF with offsetof as far as possible. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fixed typing chaos on ARM. Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/arm/simulator-arm.cc ('k') | src/base/macros.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <stdlib.h> 5 #include <stdlib.h>
6 #include <cmath> 6 #include <cmath>
7 #include <cstdarg> 7 #include <cstdarg>
8 #include "src/v8.h" 8 #include "src/v8.h"
9 9
10 #if V8_TARGET_ARCH_ARM64 10 #if V8_TARGET_ARCH_ARM64
(...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after
483 DCHECK_EQ(current->type(), type); 483 DCHECK_EQ(current->type(), type);
484 return current; 484 return current;
485 } 485 }
486 } 486 }
487 return new Redirection(external_function, type); 487 return new Redirection(external_function, type);
488 } 488 }
489 489
490 static Redirection* FromHltInstruction(Instruction* redirect_call) { 490 static Redirection* FromHltInstruction(Instruction* redirect_call) {
491 char* addr_of_hlt = reinterpret_cast<char*>(redirect_call); 491 char* addr_of_hlt = reinterpret_cast<char*>(redirect_call);
492 char* addr_of_redirection = 492 char* addr_of_redirection =
493 addr_of_hlt - OFFSET_OF(Redirection, redirect_call_); 493 addr_of_hlt - offsetof(Redirection, redirect_call_);
494 return reinterpret_cast<Redirection*>(addr_of_redirection); 494 return reinterpret_cast<Redirection*>(addr_of_redirection);
495 } 495 }
496 496
497 static void* ReverseRedirection(int64_t reg) { 497 static void* ReverseRedirection(int64_t reg) {
498 Redirection* redirection = 498 Redirection* redirection =
499 FromHltInstruction(reinterpret_cast<Instruction*>(reg)); 499 FromHltInstruction(reinterpret_cast<Instruction*>(reg));
500 return redirection->external_function<void*>(); 500 return redirection->external_function<void*>();
501 } 501 }
502 502
503 static void DeleteChain(Redirection* redirection) { 503 static void DeleteChain(Redirection* redirection) {
(...skipping 3330 matching lines...) Expand 10 before | Expand all | Expand 10 after
3834 delete[] format; 3834 delete[] format;
3835 } 3835 }
3836 3836
3837 3837
3838 #endif // USE_SIMULATOR 3838 #endif // USE_SIMULATOR
3839 3839
3840 } // namespace internal 3840 } // namespace internal
3841 } // namespace v8 3841 } // namespace v8
3842 3842
3843 #endif // V8_TARGET_ARCH_ARM64 3843 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « src/arm/simulator-arm.cc ('k') | src/base/macros.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698