~ubuntu-branches/ubuntu/saucy/libv8/saucy

« back to all changes in this revision

Viewing changes to src/ia32/macro-assembler-ia32.h

  • Committer: Package Import Robot
  • Author(s): Jérémy Lal
  • Date: 2012-04-07 16:26:13 UTC
  • mfrom: (15.1.27 sid)
  • Revision ID: package-import@ubuntu.com-20120407162613-dqo1m6w9r3fh8tst
Tags: 3.8.9.16-3
* mipsel build fixes :
  + v8_use_mips_abi_hardfloat=false, this lowers EABI requirements.
  + v8_can_use_fpu_instructions=false, detect if FPU is present.
  + set -Wno-unused-but-set-variable only on mipsel.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
// Copyright 2011 the V8 project authors. All rights reserved.
 
1
// Copyright 2012 the V8 project authors. All rights reserved.
2
2
// Redistribution and use in source and binary forms, with or without
3
3
// modification, are permitted provided that the following conditions are
4
4
// met:
237
237
  void StoreToSafepointRegisterSlot(Register dst, Immediate src);
238
238
  void LoadFromSafepointRegisterSlot(Register dst, Register src);
239
239
 
 
240
  void LoadHeapObject(Register result, Handle<HeapObject> object);
 
241
  void PushHeapObject(Handle<HeapObject> object);
 
242
 
 
243
  void LoadObject(Register result, Handle<Object> object) {
 
244
    if (object->IsHeapObject()) {
 
245
      LoadHeapObject(result, Handle<HeapObject>::cast(object));
 
246
    } else {
 
247
      Set(result, Immediate(object));
 
248
    }
 
249
  }
 
250
 
240
251
  // ---------------------------------------------------------------------------
241
252
  // JavaScript invokes
242
253
 
243
 
  // Setup call kind marking in ecx. The method takes ecx as an
 
254
  // Set up call kind marking in ecx. The method takes ecx as an
244
255
  // explicit first parameter to make the code more readable at the
245
256
  // call sites.
246
257
  void SetCallKind(Register dst, CallKind kind);
305
316
  void SafeSet(Register dst, const Immediate& x);
306
317
  void SafePush(const Immediate& x);
307
318
 
308
 
  // Compare a register against a known root, e.g. undefined, null, true, ...
 
319
  // Compare against a known root, e.g. undefined, null, true, ...
309
320
  void CompareRoot(Register with, Heap::RootListIndex index);
 
321
  void CompareRoot(const Operand& with, Heap::RootListIndex index);
310
322
 
311
323
  // Compare object type for heap object.
312
324
  // Incoming register is heap_object and outgoing register is map.
344
356
                                   Label* fail,
345
357
                                   bool specialize_for_processor);
346
358
 
 
359
  // Compare an object's map with the specified map and its transitioned
 
360
  // elements maps if mode is ALLOW_ELEMENT_TRANSITION_MAPS. FLAGS are set with
 
361
  // result of map compare. If multiple map compares are required, the compare
 
362
  // sequences branches to early_success.
 
363
  void CompareMap(Register obj,
 
364
                  Handle<Map> map,
 
365
                  Label* early_success,
 
366
                  CompareMapMode mode = REQUIRE_EXACT_MAP);
 
367
 
347
368
  // Check if the map of an object is equal to a specified map and branch to
348
369
  // label if not. Skip the smi check if not required (object is known to be a
349
 
  // heap object)
 
370
  // heap object). If mode is ALLOW_ELEMENT_TRANSITION_MAPS, then also match
 
371
  // against maps that are ElementsKind transition maps of the specified map.
350
372
  void CheckMap(Register obj,
351
373
                Handle<Map> map,
352
374
                Label* fail,
353
 
                SmiCheckType smi_check_type);
 
375
                SmiCheckType smi_check_type,
 
376
                CompareMapMode mode = REQUIRE_EXACT_MAP);
354
377
 
355
378
  // Check if the map of an object is equal to a specified map and branch to a
356
379
  // specified target if equal. Skip the smi check if not required (object is
474
497
                              Register scratch,
475
498
                              Label* miss);
476
499
 
 
500
  void GetNumberHash(Register r0, Register scratch);
477
501
 
478
502
  void LoadFromNumberDictionary(Label* miss,
479
503
                                Register elements,
718
742
  // Move if the registers are not identical.
719
743
  void Move(Register target, Register source);
720
744
 
721
 
  void Move(Register target, Handle<Object> value);
722
 
 
723
745
  // Push a handle value.
724
 
  void Push(Handle<Object> handle) { push(handle); }
 
746
  void Push(Handle<Object> handle) { push(Immediate(handle)); }
725
747
 
726
748
  Handle<Object> CodeObject() {
727
749
    ASSERT(!code_object_.is_null());
769
791
  // ---------------------------------------------------------------------------
770
792
  // String utilities.
771
793
 
772
 
  // Check whether the instance type represents a flat ascii string. Jump to the
 
794
  // Check whether the instance type represents a flat ASCII string. Jump to the
773
795
  // label if not. If the instance type can be scratched specify same register
774
796
  // for both instance type and scratch.
775
797
  void JumpIfInstanceTypeIsNotSequentialAscii(Register instance_type,
805
827
                      Handle<Code> code_constant,
806
828
                      const Operand& code_operand,
807
829
                      Label* done,
 
830
                      bool* definitely_mismatches,
808
831
                      InvokeFlag flag,
809
832
                      Label::Distance done_distance,
810
833
                      const CallWrapper& call_wrapper = NullCallWrapper(),