| OLD | NEW | 
|     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 |     5 // modification, are permitted provided that the following conditions | 
|     6 // are met: |     6 // are 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 435 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   446         instr |= (imm16 & kImm16Mask); |   446         instr |= (imm16 & kImm16Mask); | 
|   447       } |   447       } | 
|   448       instr_at_put(pos, instr); |   448       instr_at_put(pos, instr); | 
|   449       break; |   449       break; | 
|   450     } |   450     } | 
|   451     case kUnboundMovLabelOffsetOpcode: { |   451     case kUnboundMovLabelOffsetOpcode: { | 
|   452       // Load the position of the label relative to the generated code object |   452       // Load the position of the label relative to the generated code object | 
|   453       // pointer in a register. |   453       // pointer in a register. | 
|   454       Register dst = Register::from_code(instr_at(pos + kInstrSize)); |   454       Register dst = Register::from_code(instr_at(pos + kInstrSize)); | 
|   455       int32_t offset = target_pos + (Code::kHeaderSize - kHeapObjectTag); |   455       int32_t offset = target_pos + (Code::kHeaderSize - kHeapObjectTag); | 
|   456       CodePatcher patcher(reinterpret_cast<byte*>(buffer_ + pos), 2, |   456       CodePatcher patcher(isolate(), reinterpret_cast<byte*>(buffer_ + pos), 2, | 
|   457                           CodePatcher::DONT_FLUSH); |   457                           CodePatcher::DONT_FLUSH); | 
|   458       patcher.masm()->bitwise_mov32(dst, offset); |   458       patcher.masm()->bitwise_mov32(dst, offset); | 
|   459       break; |   459       break; | 
|   460     } |   460     } | 
|   461     case kUnboundAddLabelOffsetOpcode: { |   461     case kUnboundAddLabelOffsetOpcode: { | 
|   462       // dst = base + position + immediate |   462       // dst = base + position + immediate | 
|   463       Instr operands = instr_at(pos + kInstrSize); |   463       Instr operands = instr_at(pos + kInstrSize); | 
|   464       Register dst = Register::from_code((operands >> 21) & 0x1f); |   464       Register dst = Register::from_code((operands >> 21) & 0x1f); | 
|   465       Register base = Register::from_code((operands >> 16) & 0x1f); |   465       Register base = Register::from_code((operands >> 16) & 0x1f); | 
|   466       int32_t offset = target_pos + SIGN_EXT_IMM16(operands & kImm16Mask); |   466       int32_t offset = target_pos + SIGN_EXT_IMM16(operands & kImm16Mask); | 
|   467       CodePatcher patcher(reinterpret_cast<byte*>(buffer_ + pos), 2, |   467       CodePatcher patcher(isolate(), reinterpret_cast<byte*>(buffer_ + pos), 2, | 
|   468                           CodePatcher::DONT_FLUSH); |   468                           CodePatcher::DONT_FLUSH); | 
|   469       patcher.masm()->bitwise_add32(dst, base, offset); |   469       patcher.masm()->bitwise_add32(dst, base, offset); | 
|   470       break; |   470       break; | 
|   471     } |   471     } | 
|   472     case kUnboundMovLabelAddrOpcode: { |   472     case kUnboundMovLabelAddrOpcode: { | 
|   473       // Load the address of the label in a register. |   473       // Load the address of the label in a register. | 
|   474       Register dst = Register::from_code(instr_at(pos + kInstrSize)); |   474       Register dst = Register::from_code(instr_at(pos + kInstrSize)); | 
|   475       CodePatcher patcher(reinterpret_cast<byte*>(buffer_ + pos), |   475       CodePatcher patcher(isolate(), reinterpret_cast<byte*>(buffer_ + pos), | 
|   476                           kMovInstructionsNoConstantPool, |   476                           kMovInstructionsNoConstantPool, | 
|   477                           CodePatcher::DONT_FLUSH); |   477                           CodePatcher::DONT_FLUSH); | 
|   478       // Keep internal references relative until EmitRelocations. |   478       // Keep internal references relative until EmitRelocations. | 
|   479       patcher.masm()->bitwise_mov(dst, target_pos); |   479       patcher.masm()->bitwise_mov(dst, target_pos); | 
|   480       break; |   480       break; | 
|   481     } |   481     } | 
|   482     case kUnboundJumpTableEntryOpcode: { |   482     case kUnboundJumpTableEntryOpcode: { | 
|   483       CodePatcher patcher(reinterpret_cast<byte*>(buffer_ + pos), |   483       CodePatcher patcher(isolate(), reinterpret_cast<byte*>(buffer_ + pos), | 
|   484                           kPointerSize / kInstrSize, CodePatcher::DONT_FLUSH); |   484                           kPointerSize / kInstrSize, CodePatcher::DONT_FLUSH); | 
|   485       // Keep internal references relative until EmitRelocations. |   485       // Keep internal references relative until EmitRelocations. | 
|   486       patcher.masm()->dp(target_pos); |   486       patcher.masm()->dp(target_pos); | 
|   487       break; |   487       break; | 
|   488     } |   488     } | 
|   489     default: |   489     default: | 
|   490       DCHECK(false); |   490       DCHECK(false); | 
|   491       break; |   491       break; | 
|   492   } |   492   } | 
|   493 } |   493 } | 
| (...skipping 1961 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  2455  |  2455  | 
|  2456     trampoline_ = Trampoline(pc_offset() - size, tracked_branch_count_); |  2456     trampoline_ = Trampoline(pc_offset() - size, tracked_branch_count_); | 
|  2457   } |  2457   } | 
|  2458 } |  2458 } | 
|  2459  |  2459  | 
|  2460  |  2460  | 
|  2461 }  // namespace internal |  2461 }  // namespace internal | 
|  2462 }  // namespace v8 |  2462 }  // namespace v8 | 
|  2463  |  2463  | 
|  2464 #endif  // V8_TARGET_ARCH_PPC |  2464 #endif  // V8_TARGET_ARCH_PPC | 
| OLD | NEW |