| 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 54 | 54 | 
| 55 // MacroAssembler implements a collection of frequently used macros. | 55 // MacroAssembler implements a collection of frequently used macros. | 
| 56 class MacroAssembler: public Assembler { | 56 class MacroAssembler: public Assembler { | 
| 57  public: | 57  public: | 
| 58   // The isolate parameter can be NULL if the macro assembler should | 58   // The isolate parameter can be NULL if the macro assembler should | 
| 59   // not use isolate-dependent functionality. In this case, it's the | 59   // not use isolate-dependent functionality. In this case, it's the | 
| 60   // responsibility of the caller to never invoke such function on the | 60   // responsibility of the caller to never invoke such function on the | 
| 61   // macro assembler. | 61   // macro assembler. | 
| 62   MacroAssembler(Isolate* isolate, void* buffer, int size); | 62   MacroAssembler(Isolate* isolate, void* buffer, int size); | 
| 63 | 63 | 
|  | 64   // Operations on roots in the root-array. | 
|  | 65   void LoadRoot(Register destination, Heap::RootListIndex index); | 
|  | 66   void StoreRoot(Register source, Register scratch, Heap::RootListIndex index); | 
|  | 67   void CompareRoot(Register with, Register scratch, Heap::RootListIndex index); | 
|  | 68   // These methods can only be used with constant roots (i.e. non-writable | 
|  | 69   // and not in new space). | 
|  | 70   void CompareRoot(Register with, Heap::RootListIndex index); | 
|  | 71   void CompareRoot(const Operand& with, Heap::RootListIndex index); | 
|  | 72 | 
| 64   // --------------------------------------------------------------------------- | 73   // --------------------------------------------------------------------------- | 
| 65   // GC Support | 74   // GC Support | 
| 66   enum RememberedSetFinalAction { | 75   enum RememberedSetFinalAction { | 
| 67     kReturnAtEnd, | 76     kReturnAtEnd, | 
| 68     kFallThroughAtEnd | 77     kFallThroughAtEnd | 
| 69   }; | 78   }; | 
| 70 | 79 | 
| 71   // Record in the remembered set the fact that we have a pointer to new space | 80   // Record in the remembered set the fact that we have a pointer to new space | 
| 72   // at the address pointed to by the addr register.  Only works if addr is not | 81   // at the address pointed to by the addr register.  Only works if addr is not | 
| 73   // in new space. | 82   // in new space. | 
| (...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 355 | 364 | 
| 356   // Expression support | 365   // Expression support | 
| 357   void Set(Register dst, const Immediate& x); | 366   void Set(Register dst, const Immediate& x); | 
| 358   void Set(const Operand& dst, const Immediate& x); | 367   void Set(const Operand& dst, const Immediate& x); | 
| 359 | 368 | 
| 360   // Support for constant splitting. | 369   // Support for constant splitting. | 
| 361   bool IsUnsafeImmediate(const Immediate& x); | 370   bool IsUnsafeImmediate(const Immediate& x); | 
| 362   void SafeSet(Register dst, const Immediate& x); | 371   void SafeSet(Register dst, const Immediate& x); | 
| 363   void SafePush(const Immediate& x); | 372   void SafePush(const Immediate& x); | 
| 364 | 373 | 
| 365   // Compare against a known root, e.g. undefined, null, true, ... |  | 
| 366   void CompareRoot(Register with, Heap::RootListIndex index); |  | 
| 367   void CompareRoot(const Operand& with, Heap::RootListIndex index); |  | 
| 368 |  | 
| 369   // Compare object type for heap object. | 374   // Compare object type for heap object. | 
| 370   // Incoming register is heap_object and outgoing register is map. | 375   // Incoming register is heap_object and outgoing register is map. | 
| 371   void CmpObjectType(Register heap_object, InstanceType type, Register map); | 376   void CmpObjectType(Register heap_object, InstanceType type, Register map); | 
| 372 | 377 | 
| 373   // Compare instance type for map. | 378   // Compare instance type for map. | 
| 374   void CmpInstanceType(Register map, InstanceType type); | 379   void CmpInstanceType(Register map, InstanceType type); | 
| 375 | 380 | 
| 376   // Check if a map for a JSObject indicates that the object has fast elements. | 381   // Check if a map for a JSObject indicates that the object has fast elements. | 
| 377   // Jump to the specified label if it does not. | 382   // Jump to the specified label if it does not. | 
| 378   void CheckFastElements(Register map, | 383   void CheckFastElements(Register map, | 
| (...skipping 676 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1055   }                                                                       \ | 1060   }                                                                       \ | 
| 1056   masm-> | 1061   masm-> | 
| 1057 #else | 1062 #else | 
| 1058 #define ACCESS_MASM(masm) masm-> | 1063 #define ACCESS_MASM(masm) masm-> | 
| 1059 #endif | 1064 #endif | 
| 1060 | 1065 | 
| 1061 | 1066 | 
| 1062 } }  // namespace v8::internal | 1067 } }  // namespace v8::internal | 
| 1063 | 1068 | 
| 1064 #endif  // V8_IA32_MACRO_ASSEMBLER_IA32_H_ | 1069 #endif  // V8_IA32_MACRO_ASSEMBLER_IA32_H_ | 
| OLD | NEW | 
|---|