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

Side by Side Diff: src/mips64/constants-mips64.h

Issue 1216823003: MIPS64: Fix hidden bug in relocations for j and jal. Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase. Created 5 years, 5 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
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 #ifndef V8_MIPS_CONSTANTS_H_ 5 #ifndef V8_MIPS_CONSTANTS_H_
6 #define V8_MIPS_CONSTANTS_H_ 6 #define V8_MIPS_CONSTANTS_H_
7 7
8 // UNIMPLEMENTED_ macro for MIPS. 8 // UNIMPLEMENTED_ macro for MIPS.
9 #ifdef DEBUG 9 #ifdef DEBUG
10 #define UNIMPLEMENTED_MIPS() \ 10 #define UNIMPLEMENTED_MIPS() \
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 const int kSaFieldMask = ((1 << kSaBits) - 1) << kSaShift; 275 const int kSaFieldMask = ((1 << kSaBits) - 1) << kSaShift;
276 const int kFunctionFieldMask = ((1 << kFunctionBits) - 1) << kFunctionShift; 276 const int kFunctionFieldMask = ((1 << kFunctionBits) - 1) << kFunctionShift;
277 // Misc masks. 277 // Misc masks.
278 const int kHiMask = 0xffff << 16; 278 const int kHiMask = 0xffff << 16;
279 const int kLoMask = 0xffff; 279 const int kLoMask = 0xffff;
280 const int kSignMask = 0x80000000; 280 const int kSignMask = 0x80000000;
281 const int kJumpAddrMask = (1 << (kImm26Bits + kImmFieldShift)) - 1; 281 const int kJumpAddrMask = (1 << (kImm26Bits + kImmFieldShift)) - 1;
282 const int64_t kHi16MaskOf64 = (int64_t)0xffff << 48; 282 const int64_t kHi16MaskOf64 = (int64_t)0xffff << 48;
283 const int64_t kSe16MaskOf64 = (int64_t)0xffff << 32; 283 const int64_t kSe16MaskOf64 = (int64_t)0xffff << 32;
284 const int64_t kTh16MaskOf64 = (int64_t)0xffff << 16; 284 const int64_t kTh16MaskOf64 = (int64_t)0xffff << 16;
285 const int32_t kJalRawMark = 0x00000000;
286 const int32_t kJRawMark = 0xf0000000;
285 287
286 // ----- MIPS Opcodes and Function Fields. 288 // ----- MIPS Opcodes and Function Fields.
287 // We use this presentation to stay close to the table representation in 289 // We use this presentation to stay close to the table representation in
288 // MIPS32 Architecture For Programmers, Volume II: The MIPS32 Instruction Set. 290 // MIPS32 Architecture For Programmers, Volume II: The MIPS32 Instruction Set.
289 enum Opcode { 291 enum Opcode {
290 SPECIAL = 0 << kOpcodeShift, 292 SPECIAL = 0 << kOpcodeShift,
291 REGIMM = 1 << kOpcodeShift, 293 REGIMM = 1 << kOpcodeShift,
292 294
293 J = ((0 << 3) + 2) << kOpcodeShift, 295 J = ((0 << 3) + 2) << kOpcodeShift,
294 JAL = ((0 << 3) + 3) << kOpcodeShift, 296 JAL = ((0 << 3) + 3) << kOpcodeShift,
(...skipping 773 matching lines...) Expand 10 before | Expand all | Expand 10 after
1068 // TODO(plind): below should be based on kPointerSize 1070 // TODO(plind): below should be based on kPointerSize
1069 // TODO(plind): find all usages and remove the needless instructions for n64. 1071 // TODO(plind): find all usages and remove the needless instructions for n64.
1070 const int kCArgsSlotsSize = kCArgSlotCount * Instruction::kInstrSize * 2; 1072 const int kCArgsSlotsSize = kCArgSlotCount * Instruction::kInstrSize * 2;
1071 1073
1072 const int kInvalidStackOffset = -1; 1074 const int kInvalidStackOffset = -1;
1073 const int kBranchReturnOffset = 2 * Instruction::kInstrSize; 1075 const int kBranchReturnOffset = 2 * Instruction::kInstrSize;
1074 1076
1075 } } // namespace v8::internal 1077 } } // namespace v8::internal
1076 1078
1077 #endif // #ifndef V8_MIPS_CONSTANTS_H_ 1079 #endif // #ifndef V8_MIPS_CONSTANTS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698