| OLD | NEW | 
|     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 870 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   881 void MacroAssembler::VmovLow(DwVfpRegister dst, Register src) { |   881 void MacroAssembler::VmovLow(DwVfpRegister dst, Register src) { | 
|   882   if (dst.code() < 16) { |   882   if (dst.code() < 16) { | 
|   883     const LowDwVfpRegister loc = LowDwVfpRegister::from_code(dst.code()); |   883     const LowDwVfpRegister loc = LowDwVfpRegister::from_code(dst.code()); | 
|   884     vmov(loc.low(), src); |   884     vmov(loc.low(), src); | 
|   885   } else { |   885   } else { | 
|   886     vmov(dst, VmovIndexLo, src); |   886     vmov(dst, VmovIndexLo, src); | 
|   887   } |   887   } | 
|   888 } |   888 } | 
|   889  |   889  | 
|   890  |   890  | 
 |   891 void MacroAssembler::LoadConstantPoolPointerRegister() { | 
 |   892   if (FLAG_enable_ool_constant_pool) { | 
 |   893     int constant_pool_offset = Code::kConstantPoolOffset - Code::kHeaderSize - | 
 |   894         pc_offset() - Instruction::kPCReadOffset; | 
 |   895     ASSERT(ImmediateFitsAddrMode2Instruction(constant_pool_offset)); | 
 |   896     ldr(pp, MemOperand(pc, constant_pool_offset)); | 
 |   897   } | 
 |   898 } | 
 |   899  | 
 |   900  | 
|   891 void MacroAssembler::Prologue(PrologueFrameMode frame_mode) { |   901 void MacroAssembler::Prologue(PrologueFrameMode frame_mode) { | 
|   892   if (frame_mode == BUILD_STUB_FRAME) { |   902   if (frame_mode == BUILD_STUB_FRAME) { | 
|   893     PushFixedFrame(); |   903     PushFixedFrame(); | 
|   894     Push(Smi::FromInt(StackFrame::STUB)); |   904     Push(Smi::FromInt(StackFrame::STUB)); | 
|   895     // Adjust FP to point to saved FP. |   905     // Adjust FP to point to saved FP. | 
|   896     add(fp, sp, Operand(StandardFrameConstants::kFixedFrameSizeFromFp)); |   906     add(fp, sp, Operand(StandardFrameConstants::kFixedFrameSizeFromFp)); | 
|   897   } else { |   907   } else { | 
|   898     PredictableCodeSizeScope predictible_code_size_scope( |   908     PredictableCodeSizeScope predictible_code_size_scope( | 
|   899         this, kNoCodeAgeSequenceLength * Assembler::kInstrSize); |   909         this, kNoCodeAgeSequenceLength * Assembler::kInstrSize); | 
|   900     // The following three instructions must remain together and unmodified |   910     // The following three instructions must remain together and unmodified | 
|   901     // for code aging to work properly. |   911     // for code aging to work properly. | 
|   902     if (isolate()->IsCodePreAgingActive()) { |   912     if (isolate()->IsCodePreAgingActive()) { | 
|   903       // Pre-age the code. |   913       // Pre-age the code. | 
|   904       Code* stub = Code::GetPreAgedCodeAgeStub(isolate()); |   914       Code* stub = Code::GetPreAgedCodeAgeStub(isolate()); | 
|   905       add(r0, pc, Operand(-8)); |   915       add(r0, pc, Operand(-8)); | 
|   906       ldr(pc, MemOperand(pc, -4)); |   916       ldr(pc, MemOperand(pc, -4)); | 
|   907       emit_code_stub_address(stub); |   917       emit_code_stub_address(stub); | 
|   908     } else { |   918     } else { | 
|   909       PushFixedFrame(r1); |   919       PushFixedFrame(r1); | 
|   910       nop(ip.code()); |   920       nop(ip.code()); | 
|   911       // Adjust FP to point to saved FP. |   921       // Adjust FP to point to saved FP. | 
|   912       add(fp, sp, Operand(StandardFrameConstants::kFixedFrameSizeFromFp)); |   922       add(fp, sp, Operand(StandardFrameConstants::kFixedFrameSizeFromFp)); | 
|   913     } |   923     } | 
|   914   } |   924   } | 
 |   925   if (FLAG_enable_ool_constant_pool) { | 
 |   926     LoadConstantPoolPointerRegister(); | 
 |   927     set_constant_pool_available(true); | 
 |   928   } | 
|   915 } |   929 } | 
|   916  |   930  | 
|   917  |   931  | 
|   918 void MacroAssembler::LoadConstantPoolPointerRegister() { |   932 void MacroAssembler::EnterFrame(StackFrame::Type type, | 
|   919   if (FLAG_enable_ool_constant_pool) { |   933                                 bool load_constant_pool) { | 
|   920     int constant_pool_offset = |  | 
|   921         Code::kConstantPoolOffset - Code::kHeaderSize - pc_offset() - 8; |  | 
|   922     ASSERT(ImmediateFitsAddrMode2Instruction(constant_pool_offset)); |  | 
|   923     ldr(pp, MemOperand(pc, constant_pool_offset)); |  | 
|   924   } |  | 
|   925 } |  | 
|   926  |  | 
|   927  |  | 
|   928 void MacroAssembler::EnterFrame(StackFrame::Type type) { |  | 
|   929   // r0-r3: preserved |   934   // r0-r3: preserved | 
|   930   PushFixedFrame(); |   935   PushFixedFrame(); | 
 |   936   if (FLAG_enable_ool_constant_pool && load_constant_pool) { | 
 |   937     LoadConstantPoolPointerRegister(); | 
 |   938   } | 
|   931   mov(ip, Operand(Smi::FromInt(type))); |   939   mov(ip, Operand(Smi::FromInt(type))); | 
|   932   push(ip); |   940   push(ip); | 
|   933   mov(ip, Operand(CodeObject())); |   941   mov(ip, Operand(CodeObject())); | 
|   934   push(ip); |   942   push(ip); | 
|   935   // Adjust FP to point to saved FP. |   943   // Adjust FP to point to saved FP. | 
|   936   add(fp, sp, |   944   add(fp, sp, | 
|   937       Operand(StandardFrameConstants::kFixedFrameSizeFromFp + kPointerSize)); |   945       Operand(StandardFrameConstants::kFixedFrameSizeFromFp + kPointerSize)); | 
|   938 } |   946 } | 
|   939  |   947  | 
|   940  |   948  | 
| (...skipping 27 matching lines...) Expand all  Loading... | 
|   968   Push(lr, fp); |   976   Push(lr, fp); | 
|   969   mov(fp, Operand(sp));  // Set up new frame pointer. |   977   mov(fp, Operand(sp));  // Set up new frame pointer. | 
|   970   // Reserve room for saved entry sp and code object. |   978   // Reserve room for saved entry sp and code object. | 
|   971   sub(sp, sp, Operand(ExitFrameConstants::kFrameSize)); |   979   sub(sp, sp, Operand(ExitFrameConstants::kFrameSize)); | 
|   972   if (emit_debug_code()) { |   980   if (emit_debug_code()) { | 
|   973     mov(ip, Operand::Zero()); |   981     mov(ip, Operand::Zero()); | 
|   974     str(ip, MemOperand(fp, ExitFrameConstants::kSPOffset)); |   982     str(ip, MemOperand(fp, ExitFrameConstants::kSPOffset)); | 
|   975   } |   983   } | 
|   976   if (FLAG_enable_ool_constant_pool) { |   984   if (FLAG_enable_ool_constant_pool) { | 
|   977     str(pp, MemOperand(fp, ExitFrameConstants::kConstantPoolOffset)); |   985     str(pp, MemOperand(fp, ExitFrameConstants::kConstantPoolOffset)); | 
 |   986     LoadConstantPoolPointerRegister(); | 
|   978   } |   987   } | 
|   979   mov(ip, Operand(CodeObject())); |   988   mov(ip, Operand(CodeObject())); | 
|   980   str(ip, MemOperand(fp, ExitFrameConstants::kCodeOffset)); |   989   str(ip, MemOperand(fp, ExitFrameConstants::kCodeOffset)); | 
|   981  |   990  | 
|   982   // Save the frame pointer and the context in top. |   991   // Save the frame pointer and the context in top. | 
|   983   mov(ip, Operand(ExternalReference(Isolate::kCEntryFPAddress, isolate()))); |   992   mov(ip, Operand(ExternalReference(Isolate::kCEntryFPAddress, isolate()))); | 
|   984   str(fp, MemOperand(ip)); |   993   str(fp, MemOperand(ip)); | 
|   985   mov(ip, Operand(ExternalReference(Isolate::kContextAddress, isolate()))); |   994   mov(ip, Operand(ExternalReference(Isolate::kContextAddress, isolate()))); | 
|   986   str(cp, MemOperand(ip)); |   995   str(cp, MemOperand(ip)); | 
|   987  |   996  | 
| (...skipping 3059 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  4047   if (divisor < 0 && ms.multiplier() > 0) { |  4056   if (divisor < 0 && ms.multiplier() > 0) { | 
|  4048     sub(result, result, Operand(dividend)); |  4057     sub(result, result, Operand(dividend)); | 
|  4049   } |  4058   } | 
|  4050   if (ms.shift() > 0) mov(result, Operand(result, ASR, ms.shift())); |  4059   if (ms.shift() > 0) mov(result, Operand(result, ASR, ms.shift())); | 
|  4051 } |  4060 } | 
|  4052  |  4061  | 
|  4053  |  4062  | 
|  4054 } }  // namespace v8::internal |  4063 } }  // namespace v8::internal | 
|  4055  |  4064  | 
|  4056 #endif  // V8_TARGET_ARCH_ARM |  4065 #endif  // V8_TARGET_ARCH_ARM | 
| OLD | NEW |