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

Side by Side Diff: src/mips/lithium-codegen-mips.cc

Issue 23020018: MIPS: Remove wrong restriction in GenerateDeoptJumpTable. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 4 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 | 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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 } 316 }
317 } 317 }
318 // Deferred code is the last part of the instruction sequence. Mark 318 // Deferred code is the last part of the instruction sequence. Mark
319 // the generated code as done unless we bailed out. 319 // the generated code as done unless we bailed out.
320 if (!is_aborted()) status_ = DONE; 320 if (!is_aborted()) status_ = DONE;
321 return !is_aborted(); 321 return !is_aborted();
322 } 322 }
323 323
324 324
325 bool LCodeGen::GenerateDeoptJumpTable() { 325 bool LCodeGen::GenerateDeoptJumpTable() {
326 // Check that the jump table is accessible from everywhere in the function
327 // code, i.e. that offsets to the table can be encoded in the 16bit signed
328 // immediate of a branch instruction.
329 // To simplify we consider the code size from the first instruction to the
330 // end of the jump table.
331 if (!is_int16((masm()->pc_offset() / Assembler::kInstrSize) +
332 deopt_jump_table_.length() * 12)) {
333 Abort(kGeneratedCodeIsTooLarge);
334 }
335
336 if (deopt_jump_table_.length() > 0) { 326 if (deopt_jump_table_.length() > 0) {
337 Comment(";;; -------------------- Jump table --------------------"); 327 Comment(";;; -------------------- Jump table --------------------");
338 } 328 }
339 Assembler::BlockTrampolinePoolScope block_trampoline_pool(masm_); 329 Assembler::BlockTrampolinePoolScope block_trampoline_pool(masm_);
340 Label table_start; 330 Label table_start;
341 __ bind(&table_start); 331 __ bind(&table_start);
342 Label needs_frame; 332 Label needs_frame;
343 for (int i = 0; i < deopt_jump_table_.length(); i++) { 333 for (int i = 0; i < deopt_jump_table_.length(); i++) {
344 __ bind(&deopt_jump_table_[i].label); 334 __ bind(&deopt_jump_table_[i].label);
345 Address entry = deopt_jump_table_[i].address; 335 Address entry = deopt_jump_table_[i].address;
(...skipping 5447 matching lines...) Expand 10 before | Expand all | Expand 10 after
5793 __ Subu(scratch, result, scratch); 5783 __ Subu(scratch, result, scratch);
5794 __ lw(result, FieldMemOperand(scratch, 5784 __ lw(result, FieldMemOperand(scratch,
5795 FixedArray::kHeaderSize - kPointerSize)); 5785 FixedArray::kHeaderSize - kPointerSize));
5796 __ bind(&done); 5786 __ bind(&done);
5797 } 5787 }
5798 5788
5799 5789
5800 #undef __ 5790 #undef __
5801 5791
5802 } } // namespace v8::internal 5792 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698