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

Unified Diff: src/arm64/assembler-arm64-inl.h

Issue 268353005: ARM64: Fix and improve MacroAssembler::Printf. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Reorganise Simulator::DoPrintf as suggested. Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/arm64/assembler-arm64.h ('k') | src/arm64/instructions-arm64.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arm64/assembler-arm64-inl.h
diff --git a/src/arm64/assembler-arm64-inl.h b/src/arm64/assembler-arm64-inl.h
index 3c17153f68eeb403f96197d2b85a3b7a603d2b26..70e30521691220891e90ce20210b964cf5c050cd 100644
--- a/src/arm64/assembler-arm64-inl.h
+++ b/src/arm64/assembler-arm64-inl.h
@@ -109,8 +109,13 @@ inline bool CPURegister::IsNone() const {
inline bool CPURegister::Is(const CPURegister& other) const {
ASSERT(IsValidOrNone() && other.IsValidOrNone());
- return (reg_code == other.reg_code) && (reg_size == other.reg_size) &&
- (reg_type == other.reg_type);
+ return Aliases(other) && (reg_size == other.reg_size);
+}
+
+
+inline bool CPURegister::Aliases(const CPURegister& other) const {
+ ASSERT(IsValidOrNone() && other.IsValidOrNone());
+ return (reg_code == other.reg_code) && (reg_type == other.reg_type);
}
@@ -195,16 +200,22 @@ inline void CPURegList::Remove(int code) {
inline Register Register::XRegFromCode(unsigned code) {
- // This function returns the zero register when code = 31. The stack pointer
- // can not be returned.
- ASSERT(code < kNumberOfRegisters);
- return Register::Create(code, kXRegSizeInBits);
+ if (code == kSPRegInternalCode) {
+ return csp;
+ } else {
+ ASSERT(code < kNumberOfRegisters);
+ return Register::Create(code, kXRegSizeInBits);
+ }
}
inline Register Register::WRegFromCode(unsigned code) {
- ASSERT(code < kNumberOfRegisters);
- return Register::Create(code, kWRegSizeInBits);
+ if (code == kSPRegInternalCode) {
+ return wcsp;
+ } else {
+ ASSERT(code < kNumberOfRegisters);
+ return Register::Create(code, kWRegSizeInBits);
+ }
}
« no previous file with comments | « src/arm64/assembler-arm64.h ('k') | src/arm64/instructions-arm64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698