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

Side by Side Diff: src/mips64/assembler-mips64.cc

Issue 1233623004: MIPS: Check that branches to trampoline pool do actually reach. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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
« no previous file with comments | « src/mips/assembler-mips.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 1994-2006 Sun Microsystems Inc. 1 // Copyright (c) 1994-2006 Sun Microsystems Inc.
2 // All Rights Reserved. 2 // All Rights Reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions are 5 // modification, are permitted provided that the following conditions are
6 // met: 6 // met:
7 // 7 //
8 // - Redistributions of source code must retain the above copyright notice, 8 // - Redistributions of source code must retain the above copyright notice,
9 // this list of conditions and the following disclaimer. 9 // this list of conditions and the following disclaimer.
10 // 10 //
(...skipping 783 matching lines...) Expand 10 before | Expand all | Expand 10 after
794 // fixup_pos. 794 // fixup_pos.
795 Instr instr = instr_at(fixup_pos); 795 Instr instr = instr_at(fixup_pos);
796 if (is_internal) { 796 if (is_internal) {
797 target_at_put(fixup_pos, pos, is_internal); 797 target_at_put(fixup_pos, pos, is_internal);
798 } else if (IsBranch(instr)) { 798 } else if (IsBranch(instr)) {
799 if (dist > kMaxBranchOffset) { 799 if (dist > kMaxBranchOffset) {
800 if (trampoline_pos == kInvalidSlotPos) { 800 if (trampoline_pos == kInvalidSlotPos) {
801 trampoline_pos = get_trampoline_entry(fixup_pos); 801 trampoline_pos = get_trampoline_entry(fixup_pos);
802 CHECK(trampoline_pos != kInvalidSlotPos); 802 CHECK(trampoline_pos != kInvalidSlotPos);
803 } 803 }
804 DCHECK((trampoline_pos - fixup_pos) <= kMaxBranchOffset); 804 CHECK((trampoline_pos - fixup_pos) <= kMaxBranchOffset);
805 target_at_put(fixup_pos, trampoline_pos, false); 805 target_at_put(fixup_pos, trampoline_pos, false);
806 fixup_pos = trampoline_pos; 806 fixup_pos = trampoline_pos;
807 dist = pos - fixup_pos; 807 dist = pos - fixup_pos;
808 } 808 }
809 target_at_put(fixup_pos, pos, false); 809 target_at_put(fixup_pos, pos, false);
810 } else { 810 } else {
811 DCHECK(IsJ(instr) || IsJal(instr) || IsLui(instr) || 811 DCHECK(IsJ(instr) || IsJal(instr) || IsLui(instr) ||
812 IsEmittedConstant(instr)); 812 IsEmittedConstant(instr));
813 target_at_put(fixup_pos, pos, false); 813 target_at_put(fixup_pos, pos, false);
814 } 814 }
(...skipping 2424 matching lines...) Expand 10 before | Expand all | Expand 10 after
3239 if (icache_flush_mode != SKIP_ICACHE_FLUSH) { 3239 if (icache_flush_mode != SKIP_ICACHE_FLUSH) {
3240 CpuFeatures::FlushICache(pc, 4 * Assembler::kInstrSize); 3240 CpuFeatures::FlushICache(pc, 4 * Assembler::kInstrSize);
3241 } 3241 }
3242 } 3242 }
3243 3243
3244 3244
3245 } // namespace internal 3245 } // namespace internal
3246 } // namespace v8 3246 } // namespace v8
3247 3247
3248 #endif // V8_TARGET_ARCH_MIPS64 3248 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/mips/assembler-mips.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698