| OLD | NEW |
| 1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2009 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 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 | 176 |
| 177 // --------------------------------------------------------------------------- | 177 // --------------------------------------------------------------------------- |
| 178 // Allocation support | 178 // Allocation support |
| 179 | 179 |
| 180 // Allocate an object in new space. If the new space is exhausted control | 180 // Allocate an object in new space. If the new space is exhausted control |
| 181 // continues at the gc_required label. The allocated object is returned in | 181 // continues at the gc_required label. The allocated object is returned in |
| 182 // result and end of the new object is returned in result_end. The register | 182 // result and end of the new object is returned in result_end. The register |
| 183 // scratch can be passed as no_reg in which case an additional object | 183 // scratch can be passed as no_reg in which case an additional object |
| 184 // reference will be added to the reloc info. The returned pointers in result | 184 // reference will be added to the reloc info. The returned pointers in result |
| 185 // and result_end have not yet been tagged as heap objects. If | 185 // and result_end have not yet been tagged as heap objects. If |
| 186 // result_contains_top_on_entry is true the contnt of result is known to be | 186 // result_contains_top_on_entry is true the content of result is known to be |
| 187 // the allocation top on entry (could be result_end from a previous call to | 187 // the allocation top on entry (could be result_end from a previous call to |
| 188 // AllocateInNewSpace). If result_contains_top_on_entry is true scratch | 188 // AllocateInNewSpace). If result_contains_top_on_entry is true scratch |
| 189 // should be no_reg as it is never used. | 189 // should be no_reg as it is never used. |
| 190 void AllocateInNewSpace(int object_size, | 190 void AllocateInNewSpace(int object_size, |
| 191 Register result, | 191 Register result, |
| 192 Register result_end, | 192 Register result_end, |
| 193 Register scratch, | 193 Register scratch, |
| 194 Label* gc_required, | 194 Label* gc_required, |
| 195 AllocationFlags flags); | 195 AllocationFlags flags); |
| 196 | 196 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 218 | 218 |
| 219 // Allocate a heap number in new space with undefined value. The | 219 // Allocate a heap number in new space with undefined value. The |
| 220 // register scratch2 can be passed as no_reg; the others must be | 220 // register scratch2 can be passed as no_reg; the others must be |
| 221 // valid registers. Returns tagged pointer in result register, or | 221 // valid registers. Returns tagged pointer in result register, or |
| 222 // jumps to gc_required if new space is full. | 222 // jumps to gc_required if new space is full. |
| 223 void AllocateHeapNumber(Register result, | 223 void AllocateHeapNumber(Register result, |
| 224 Register scratch1, | 224 Register scratch1, |
| 225 Register scratch2, | 225 Register scratch2, |
| 226 Label* gc_required); | 226 Label* gc_required); |
| 227 | 227 |
| 228 // Allocate a sequential string. All the header fields of the string object |
| 229 // are initialized. |
| 230 void AllocateTwoByteString(Register result, |
| 231 Register length, |
| 232 Register scratch1, |
| 233 Register scratch2, |
| 234 Register scratch3, |
| 235 Label* gc_required); |
| 236 void AllocateAsciiString(Register result, |
| 237 Register length, |
| 238 Register scratch1, |
| 239 Register scratch2, |
| 240 Register scratch3, |
| 241 Label* gc_required); |
| 242 |
| 243 // Allocate a raw cons string object. Only the map field of the result is |
| 244 // initialized. |
| 245 void AllocateConsString(Register result, |
| 246 Register scratch1, |
| 247 Register scratch2, |
| 248 Label* gc_required); |
| 249 void AllocateAsciiConsString(Register result, |
| 250 Register scratch1, |
| 251 Register scratch2, |
| 252 Label* gc_required); |
| 253 |
| 228 // --------------------------------------------------------------------------- | 254 // --------------------------------------------------------------------------- |
| 229 // Support functions. | 255 // Support functions. |
| 230 | 256 |
| 231 // Check if result is zero and op is negative. | 257 // Check if result is zero and op is negative. |
| 232 void NegativeZeroTest(Register result, Register op, Label* then_label); | 258 void NegativeZeroTest(Register result, Register op, Label* then_label); |
| 233 | 259 |
| 234 // Check if result is zero and op is negative in code using jump targets. | 260 // Check if result is zero and op is negative in code using jump targets. |
| 235 void NegativeZeroTest(CodeGenerator* cgen, | 261 void NegativeZeroTest(CodeGenerator* cgen, |
| 236 Register result, | 262 Register result, |
| 237 Register op, | 263 Register op, |
| (...skipping 17 matching lines...) Expand all Loading... |
| 255 // Generates code for reporting that an illegal operation has | 281 // Generates code for reporting that an illegal operation has |
| 256 // occurred. | 282 // occurred. |
| 257 void IllegalOperation(int num_arguments); | 283 void IllegalOperation(int num_arguments); |
| 258 | 284 |
| 259 // --------------------------------------------------------------------------- | 285 // --------------------------------------------------------------------------- |
| 260 // Runtime calls | 286 // Runtime calls |
| 261 | 287 |
| 262 // Call a code stub. | 288 // Call a code stub. |
| 263 void CallStub(CodeStub* stub); | 289 void CallStub(CodeStub* stub); |
| 264 | 290 |
| 291 // Tail call a code stub (jump). |
| 292 void TailCallStub(CodeStub* stub); |
| 293 |
| 265 // Return from a code stub after popping its arguments. | 294 // Return from a code stub after popping its arguments. |
| 266 void StubReturn(int argc); | 295 void StubReturn(int argc); |
| 267 | 296 |
| 268 // Call a runtime routine. | 297 // Call a runtime routine. |
| 269 // Eventually this should be used for all C calls. | 298 // Eventually this should be used for all C calls. |
| 270 void CallRuntime(Runtime::Function* f, int num_arguments); | 299 void CallRuntime(Runtime::Function* f, int num_arguments); |
| 271 | 300 |
| 272 // Convenience function: Same as above, but takes the fid instead. | 301 // Convenience function: Same as above, but takes the fid instead. |
| 273 void CallRuntime(Runtime::FunctionId id, int num_arguments); | 302 void CallRuntime(Runtime::FunctionId id, int num_arguments); |
| 274 | 303 |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 430 } \ | 459 } \ |
| 431 masm-> | 460 masm-> |
| 432 #else | 461 #else |
| 433 #define ACCESS_MASM(masm) masm-> | 462 #define ACCESS_MASM(masm) masm-> |
| 434 #endif | 463 #endif |
| 435 | 464 |
| 436 | 465 |
| 437 } } // namespace v8::internal | 466 } } // namespace v8::internal |
| 438 | 467 |
| 439 #endif // V8_IA32_MACRO_ASSEMBLER_IA32_H_ | 468 #endif // V8_IA32_MACRO_ASSEMBLER_IA32_H_ |
| OLD | NEW |