| OLD | NEW |
| 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 #include "src/codegen.h" | 5 #include "src/codegen.h" |
| 6 #include "src/deoptimizer.h" | 6 #include "src/deoptimizer.h" |
| 7 #include "src/full-codegen/full-codegen.h" | 7 #include "src/full-codegen/full-codegen.h" |
| 8 #include "src/register-configuration.h" | 8 #include "src/register-configuration.h" |
| 9 #include "src/safepoint-table.h" | 9 #include "src/safepoint-table.h" |
| 10 | 10 |
| (...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 322 DCHECK_EQ(table_entry_size_, masm()->pc_offset() - start); | 322 DCHECK_EQ(table_entry_size_, masm()->pc_offset() - start); |
| 323 } | 323 } |
| 324 __ bind(&done); | 324 __ bind(&done); |
| 325 } else { | 325 } else { |
| 326 // We want to keep table_entry_size_ == 8 (since this is the common case), | 326 // We want to keep table_entry_size_ == 8 (since this is the common case), |
| 327 // but we need two instructions to load most immediates over 0xff. To handle | 327 // but we need two instructions to load most immediates over 0xff. To handle |
| 328 // this, we set the low byte in the main table, and then set the high byte | 328 // this, we set the low byte in the main table, and then set the high byte |
| 329 // in a separate table if necessary. | 329 // in a separate table if necessary. |
| 330 Label high_fixes[256]; | 330 Label high_fixes[256]; |
| 331 int high_fix_max = (count() - 1) >> 8; | 331 int high_fix_max = (count() - 1) >> 8; |
| 332 DCHECK_GT(arraysize(high_fixes), high_fix_max); | 332 DCHECK_GT(arraysize(high_fixes), static_cast<size_t>(high_fix_max)); |
| 333 for (int i = 0; i < count(); i++) { | 333 for (int i = 0; i < count(); i++) { |
| 334 int start = masm()->pc_offset(); | 334 int start = masm()->pc_offset(); |
| 335 USE(start); | 335 USE(start); |
| 336 __ mov(ip, Operand(i & 0xff)); // Set the low byte. | 336 __ mov(ip, Operand(i & 0xff)); // Set the low byte. |
| 337 __ b(&high_fixes[i >> 8]); // Jump to the secondary table. | 337 __ b(&high_fixes[i >> 8]); // Jump to the secondary table. |
| 338 DCHECK_EQ(table_entry_size_, masm()->pc_offset() - start); | 338 DCHECK_EQ(table_entry_size_, masm()->pc_offset() - start); |
| 339 } | 339 } |
| 340 // Generate the secondary table, to set the high byte. | 340 // Generate the secondary table, to set the high byte. |
| 341 for (int high = 1; high <= high_fix_max; high++) { | 341 for (int high = 1; high <= high_fix_max; high++) { |
| 342 __ bind(&high_fixes[high]); | 342 __ bind(&high_fixes[high]); |
| (...skipping 24 matching lines...) Expand all Loading... |
| 367 void FrameDescription::SetCallerConstantPool(unsigned offset, intptr_t value) { | 367 void FrameDescription::SetCallerConstantPool(unsigned offset, intptr_t value) { |
| 368 DCHECK(FLAG_enable_embedded_constant_pool); | 368 DCHECK(FLAG_enable_embedded_constant_pool); |
| 369 SetFrameSlot(offset, value); | 369 SetFrameSlot(offset, value); |
| 370 } | 370 } |
| 371 | 371 |
| 372 | 372 |
| 373 #undef __ | 373 #undef __ |
| 374 | 374 |
| 375 } // namespace internal | 375 } // namespace internal |
| 376 } // namespace v8 | 376 } // namespace v8 |
| OLD | NEW |