| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 // MacroAssembler implements a collection of frequently used macros. | 70 // MacroAssembler implements a collection of frequently used macros. |
| 71 class MacroAssembler: public Assembler { | 71 class MacroAssembler: public Assembler { |
| 72 public: | 72 public: |
| 73 MacroAssembler(void* buffer, int size); | 73 MacroAssembler(void* buffer, int size); |
| 74 | 74 |
| 75 // --------------------------------------------------------------------------- | 75 // --------------------------------------------------------------------------- |
| 76 // Low-level helpers for compiler | 76 // Low-level helpers for compiler |
| 77 | 77 |
| 78 // Jump, Call, and Ret pseudo instructions implementing inter-working | 78 // Jump, Call, and Ret pseudo instructions implementing inter-working |
| 79 private: | 79 private: |
| 80 void Jump(intptr_t target, RelocMode rmode, Condition cond = al); | 80 void Jump(intptr_t target, RelocInfo::Mode rmode, Condition cond = al); |
| 81 void Call(intptr_t target, RelocMode rmode, Condition cond = al); | 81 void Call(intptr_t target, RelocInfo::Mode rmode, Condition cond = al); |
| 82 public: | 82 public: |
| 83 void Jump(Register target, Condition cond = al); | 83 void Jump(Register target, Condition cond = al); |
| 84 void Jump(byte* target, RelocMode rmode, Condition cond = al); | 84 void Jump(byte* target, RelocInfo::Mode rmode, Condition cond = al); |
| 85 void Jump(Handle<Code> code, RelocMode rmode, Condition cond = al); | 85 void Jump(Handle<Code> code, RelocInfo::Mode rmode, Condition cond = al); |
| 86 void Call(Register target, Condition cond = al); | 86 void Call(Register target, Condition cond = al); |
| 87 void Call(byte* target, RelocMode rmode, Condition cond = al); | 87 void Call(byte* target, RelocInfo::Mode rmode, Condition cond = al); |
| 88 void Call(Handle<Code> code, RelocMode rmode, Condition cond = al); | 88 void Call(Handle<Code> code, RelocInfo::Mode rmode, Condition cond = al); |
| 89 void Ret(); | 89 void Ret(); |
| 90 | 90 |
| 91 // Sets the remembered set bit for [address+offset], where address is the | 91 // Sets the remembered set bit for [address+offset], where address is the |
| 92 // address of the heap object 'object'. The address must be in the first 8K | 92 // address of the heap object 'object'. The address must be in the first 8K |
| 93 // of an allocated page. The 'scratch' register is used in the | 93 // of an allocated page. The 'scratch' register is used in the |
| 94 // implementation and all 3 registers are clobbered by the operation, as | 94 // implementation and all 3 registers are clobbered by the operation, as |
| 95 // well as the ip register. | 95 // well as the ip register. |
| 96 void RecordWrite(Register object, Register offset, Register scratch); | 96 void RecordWrite(Register object, Register offset, Register scratch); |
| 97 | 97 |
| 98 // --------------------------------------------------------------------------- | 98 // --------------------------------------------------------------------------- |
| 99 // Activation frames | 99 // Activation frames |
| 100 | 100 |
| 101 void EnterInternalFrame(); | 101 void EnterInternalFrame(); |
| 102 void ExitInternalFrame(); | 102 void ExitInternalFrame(); |
| 103 | 103 |
| 104 | 104 |
| 105 // --------------------------------------------------------------------------- | 105 // --------------------------------------------------------------------------- |
| 106 // JavaScript invokes | 106 // JavaScript invokes |
| 107 | 107 |
| 108 // Invoke the JavaScript function code by either calling or jumping. | 108 // Invoke the JavaScript function code by either calling or jumping. |
| 109 void InvokeCode(Register code, | 109 void InvokeCode(Register code, |
| 110 const ParameterCount& expected, | 110 const ParameterCount& expected, |
| 111 const ParameterCount& actual, | 111 const ParameterCount& actual, |
| 112 InvokeFlag flag); | 112 InvokeFlag flag); |
| 113 | 113 |
| 114 void InvokeCode(Handle<Code> code, | 114 void InvokeCode(Handle<Code> code, |
| 115 const ParameterCount& expected, | 115 const ParameterCount& expected, |
| 116 const ParameterCount& actual, | 116 const ParameterCount& actual, |
| 117 RelocMode rmode, | 117 RelocInfo::Mode rmode, |
| 118 InvokeFlag flag); | 118 InvokeFlag flag); |
| 119 | 119 |
| 120 // Invoke the JavaScript function in the given register. Changes the | 120 // Invoke the JavaScript function in the given register. Changes the |
| 121 // current context to the context in the function before invoking. | 121 // current context to the context in the function before invoking. |
| 122 void InvokeFunction(Register function, | 122 void InvokeFunction(Register function, |
| 123 const ParameterCount& actual, | 123 const ParameterCount& actual, |
| 124 InvokeFlag flag); | 124 InvokeFlag flag); |
| 125 | 125 |
| 126 | 126 |
| 127 // --------------------------------------------------------------------------- | 127 // --------------------------------------------------------------------------- |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 251 // Generate a MemOperand for loading a field from an object. | 251 // Generate a MemOperand for loading a field from an object. |
| 252 static inline MemOperand FieldMemOperand(Register object, int offset) { | 252 static inline MemOperand FieldMemOperand(Register object, int offset) { |
| 253 return MemOperand(object, offset - kHeapObjectTag); | 253 return MemOperand(object, offset - kHeapObjectTag); |
| 254 } | 254 } |
| 255 | 255 |
| 256 | 256 |
| 257 | 257 |
| 258 } } // namespace v8::internal | 258 } } // namespace v8::internal |
| 259 | 259 |
| 260 #endif // V8_MACRO_ASSEMBLER_ARM_H_ | 260 #endif // V8_MACRO_ASSEMBLER_ARM_H_ |
| OLD | NEW |