Revision f230a1cf deps/v8/src/arm/macro-assembler-arm.h

View differences:

deps/v8/src/arm/macro-assembler-arm.h
45 45

  
46 46

  
47 47
// Give alias names to registers
48
const Register cp = { 8 };  // JavaScript context pointer
49
const Register kRootRegister = { 10 };  // Roots array pointer.
48
const Register pp = { kRegister_r7_Code };  // Constant pool pointer.
49
const Register cp = { kRegister_r8_Code };  // JavaScript context pointer.
50
const Register kRootRegister = { kRegister_r10_Code };  // Roots array pointer.
50 51

  
51 52
// Flags used for AllocateHeapNumber
52 53
enum TaggingMode {
......
169 170
                 Heap::RootListIndex index,
170 171
                 Condition cond = al);
171 172

  
172
  void LoadHeapObject(Register dst, Handle<HeapObject> object);
173

  
174
  void LoadObject(Register result, Handle<Object> object) {
175
    AllowDeferredHandleDereference heap_object_check;
176
    if (object->IsHeapObject()) {
177
      LoadHeapObject(result, Handle<HeapObject>::cast(object));
178
    } else {
179
      Move(result, object);
180
    }
181
  }
182

  
183 173
  // ---------------------------------------------------------------------------
184 174
  // GC Support
185 175

  
......
469 459
  void VFPEnsureFPSCRState(Register scratch);
470 460

  
471 461
  // If the value is a NaN, canonicalize the value else, do nothing.
472
  void VFPCanonicalizeNaN(const DwVfpRegister value,
462
  void VFPCanonicalizeNaN(const DwVfpRegister dst,
463
                          const DwVfpRegister src,
473 464
                          const Condition cond = al);
465
  void VFPCanonicalizeNaN(const DwVfpRegister value,
466
                          const Condition cond = al) {
467
    VFPCanonicalizeNaN(value, value, cond);
468
  }
474 469

  
475 470
  // Compare double values and move the result to the normal condition flags.
476 471
  void VFPCompareAndSetFlags(const DwVfpRegister src1,
......
533 528
                         LowDwVfpRegister double_scratch1,
534 529
                         Label* not_int32);
535 530

  
531
  // Generates function and stub prologue code.
532
  void Prologue(PrologueFrameMode frame_mode);
536 533

  
537 534
  // Enter exit frame.
538 535
  // stack_space - extra stack space, used for alignment before call to C.
......
541 538
  // Leave the current exit frame. Expects the return value in r0.
542 539
  // Expect the number of values, pushed prior to the exit frame, to
543 540
  // remove in a register (or no_reg, if there is nothing to remove).
544
  void LeaveExitFrame(bool save_doubles, Register argument_count);
541
  void LeaveExitFrame(bool save_doubles,
542
                      Register argument_count,
543
                      bool restore_context);
545 544

  
546 545
  // Get the actual activation frame alignment for target environment.
547 546
  static int ActivationFrameAlignment();
......
1037 1036
  void TailCallStub(CodeStub* stub, Condition cond = al);
1038 1037

  
1039 1038
  // Call a runtime routine.
1040
  void CallRuntime(const Runtime::Function* f, int num_arguments);
1041
  void CallRuntimeSaveDoubles(Runtime::FunctionId id);
1039
  void CallRuntime(const Runtime::Function* f,
1040
                   int num_arguments,
1041
                   SaveFPRegsMode save_doubles = kDontSaveFPRegs);
1042
  void CallRuntimeSaveDoubles(Runtime::FunctionId id) {
1043
    const Runtime::Function* function = Runtime::FunctionForId(id);
1044
    CallRuntime(function, function->nargs, kSaveFPRegs);
1045
  }
1042 1046

  
1043 1047
  // Convenience function: Same as above, but takes the fid instead.
1044
  void CallRuntime(Runtime::FunctionId fid, int num_arguments);
1048
  void CallRuntime(Runtime::FunctionId id, int num_arguments) {
1049
    CallRuntime(Runtime::FunctionForId(id), num_arguments);
1050
  }
1045 1051

  
1046 1052
  // Convenience function: call an external reference.
1047 1053
  void CallExternalReference(const ExternalReference& ext,
......
1111 1117
                                ExternalReference thunk_ref,
1112 1118
                                Register thunk_last_arg,
1113 1119
                                int stack_space,
1114
                                int return_value_offset_from_fp);
1120
                                MemOperand return_value_operand,
1121
                                MemOperand* context_restore_operand);
1115 1122

  
1116 1123
  // Jump to a runtime routine.
1117 1124
  void JumpToExternalReference(const ExternalReference& builtin);
......
1286 1293
  // ---------------------------------------------------------------------------
1287 1294
  // String utilities
1288 1295

  
1296
  // Generate code to do a lookup in the number string cache. If the number in
1297
  // the register object is found in the cache the generated code falls through
1298
  // with the result in the result register. The object and the result register
1299
  // can be the same. If the number is not found in the cache the code jumps to
1300
  // the label not_found with only the content of register object unchanged.
1301
  void LookupNumberStringCache(Register object,
1302
                               Register result,
1303
                               Register scratch1,
1304
                               Register scratch2,
1305
                               Register scratch3,
1306
                               Label* not_found);
1307

  
1289 1308
  // Checks if both objects are sequential ASCII strings and jumps to label
1290 1309
  // if either is not. Assumes that neither object is a smi.
1291 1310
  void JumpIfNonSmisNotBothSequentialAsciiStrings(Register object1,
......
1360 1379
  // to another type.
1361 1380
  // On entry, receiver_reg should point to the array object.
1362 1381
  // scratch_reg gets clobbered.
1363
  // If allocation info is present, condition flags are set to eq
1382
  // If allocation info is present, condition flags are set to eq.
1364 1383
  void TestJSArrayForAllocationMemento(Register receiver_reg,
1365
                                       Register scratch_reg);
1384
                                       Register scratch_reg,
1385
                                       Label* no_memento_found);
1386

  
1387
  void JumpIfJSArrayHasAllocationMemento(Register receiver_reg,
1388
                                         Register scratch_reg,
1389
                                         Label* memento_found) {
1390
    Label no_memento_found;
1391
    TestJSArrayForAllocationMemento(receiver_reg, scratch_reg,
1392
                                    &no_memento_found);
1393
    b(eq, memento_found);
1394
    bind(&no_memento_found);
1395
  }
1366 1396

  
1367 1397
 private:
1368 1398
  void CallCFunctionHelper(Register function,

Also available in: Unified diff