| 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 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 298 | 298 |
| 299 // Macro assembler to emit code. | 299 // Macro assembler to emit code. |
| 300 MacroAssembler* masm() { return &masm_; } | 300 MacroAssembler* masm() { return &masm_; } |
| 301 | 301 |
| 302 private: | 302 private: |
| 303 byte* address_; // The address of the code being patched. | 303 byte* address_; // The address of the code being patched. |
| 304 int size_; // Number of bytes of the expected patch size. | 304 int size_; // Number of bytes of the expected patch size. |
| 305 MacroAssembler masm_; // Macro assembler used to generate the code. | 305 MacroAssembler masm_; // Macro assembler used to generate the code. |
| 306 }; | 306 }; |
| 307 | 307 |
| 308 |
| 308 // ----------------------------------------------------------------------------- | 309 // ----------------------------------------------------------------------------- |
| 309 // Static helper functions. | 310 // Static helper functions. |
| 310 | 311 |
| 311 // Generate an Operand for loading a field from an object. | 312 // Generate an Operand for loading a field from an object. |
| 312 static inline Operand FieldOperand(Register object, int offset) { | 313 static inline Operand FieldOperand(Register object, int offset) { |
| 313 return Operand(object, offset - kHeapObjectTag); | 314 return Operand(object, offset - kHeapObjectTag); |
| 314 } | 315 } |
| 315 | 316 |
| 316 | 317 |
| 317 // Generate an Operand for loading an indexed field from an object. | 318 // Generate an Operand for loading an indexed field from an object. |
| 318 static inline Operand FieldOperand(Register object, | 319 static inline Operand FieldOperand(Register object, |
| 319 Register index, | 320 Register index, |
| 320 ScaleFactor scale, | 321 ScaleFactor scale, |
| 321 int offset) { | 322 int offset) { |
| 322 return Operand(object, index, scale, offset - kHeapObjectTag); | 323 return Operand(object, index, scale, offset - kHeapObjectTag); |
| 323 } | 324 } |
| 324 | 325 |
| 325 | 326 |
| 326 } } // namespace v8::internal | 327 } } // namespace v8::internal |
| 327 | 328 |
| 328 #endif // V8_MACRO_ASSEMBLER_IA32_H_ | 329 #endif // V8_MACRO_ASSEMBLER_IA32_H_ |
| OLD | NEW |