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

Side by Side Diff: src/a64/simulator-a64.h

Issue 145583004: A64: Fix sampling of fp register for CPU profile and bailout if sp or fp is zero. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | src/sampler.cc » ('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 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after
433 } 433 }
434 434
435 template<typename T> 435 template<typename T>
436 inline void set_sp(T value) { 436 inline void set_sp(T value) {
437 ASSERT(sizeof(T) == kPointerSize); 437 ASSERT(sizeof(T) == kPointerSize);
438 set_reg(31, value, Reg31IsStackPointer); 438 set_reg(31, value, Reg31IsStackPointer);
439 } 439 }
440 440
441 inline int64_t sp() { return xreg(31, Reg31IsStackPointer); } 441 inline int64_t sp() { return xreg(31, Reg31IsStackPointer); }
442 inline int64_t jssp() { return xreg(kJSSPCode, Reg31IsStackPointer); } 442 inline int64_t jssp() { return xreg(kJSSPCode, Reg31IsStackPointer); }
443 inline int64_t fp() { return xreg(29, Reg31IsStackPointer); }
jbramley 2014/01/27 10:40:21 We have a kFramePointerRegCode.
ulan 2014/01/27 10:55:06 Done.
443 inline Instruction* lr() { return reg<Instruction*>(kLinkRegCode); } 444 inline Instruction* lr() { return reg<Instruction*>(kLinkRegCode); }
444 445
445 // Return 'size' bits of the value of a floating-point register, as the 446 // Return 'size' bits of the value of a floating-point register, as the
446 // specified type. The value is zero-extended to fill the result. 447 // specified type. The value is zero-extended to fill the result.
447 // 448 //
448 // The only supported values of 'size' are kDRegSize and kSRegSize. 449 // The only supported values of 'size' are kDRegSize and kSRegSize.
449 template<typename T> 450 template<typename T>
450 inline T fpreg(unsigned size, unsigned code) const { 451 inline T fpreg(unsigned size, unsigned code) const {
451 unsigned size_in_bytes = size / 8; 452 unsigned size_in_bytes = size / 8;
452 ASSERT(size_in_bytes <= sizeof(T)); 453 ASSERT(size_in_bytes <= sizeof(T));
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after
847 static inline void UnregisterCTryCatch() { 848 static inline void UnregisterCTryCatch() {
848 Simulator::current(Isolate::Current())->PopAddress(); 849 Simulator::current(Isolate::Current())->PopAddress();
849 } 850 }
850 }; 851 };
851 852
852 #endif // !defined(USE_SIMULATOR) 853 #endif // !defined(USE_SIMULATOR)
853 854
854 } } // namespace v8::internal 855 } } // namespace v8::internal
855 856
856 #endif // V8_A64_SIMULATOR_A64_H_ 857 #endif // V8_A64_SIMULATOR_A64_H_
OLDNEW
« no previous file with comments | « no previous file | src/sampler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698