Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Side by Side Diff: src/x64/builtins-x64.cc

Issue 205343013: Introduce andp, notp, orp and xorp for x64 port (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased with bleeding_edge Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/x64/assembler-x64.cc ('k') | src/x64/code-stubs-x64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 __ InitializeFieldsWithFiller(rcx, rdi, rdx); 271 __ InitializeFieldsWithFiller(rcx, rdi, rdx);
272 } 272 }
273 273
274 // Add the object tag to make the JSObject real, so that we can continue 274 // Add the object tag to make the JSObject real, so that we can continue
275 // and jump into the continuation code at any time from now on. Any 275 // and jump into the continuation code at any time from now on. Any
276 // failures need to undo the allocation, so that the heap is in a 276 // failures need to undo the allocation, so that the heap is in a
277 // consistent state and verifiable. 277 // consistent state and verifiable.
278 // rax: initial map 278 // rax: initial map
279 // rbx: JSObject 279 // rbx: JSObject
280 // rdi: start of next object 280 // rdi: start of next object
281 __ or_(rbx, Immediate(kHeapObjectTag)); 281 __ orp(rbx, Immediate(kHeapObjectTag));
282 282
283 // Check if a non-empty properties array is needed. 283 // Check if a non-empty properties array is needed.
284 // Allocate and initialize a FixedArray if it is. 284 // Allocate and initialize a FixedArray if it is.
285 // rax: initial map 285 // rax: initial map
286 // rbx: JSObject 286 // rbx: JSObject
287 // rdi: start of next object 287 // rdi: start of next object
288 // Calculate total properties described map. 288 // Calculate total properties described map.
289 __ movzxbp(rdx, FieldOperand(rax, Map::kUnusedPropertyFieldsOffset)); 289 __ movzxbp(rdx, FieldOperand(rax, Map::kUnusedPropertyFieldsOffset));
290 __ movzxbp(rcx, 290 __ movzxbp(rcx,
291 FieldOperand(rax, Map::kPreAllocatedPropertyFieldsOffset)); 291 FieldOperand(rax, Map::kPreAllocatedPropertyFieldsOffset));
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 __ addp(rcx, Immediate(kPointerSize)); 335 __ addp(rcx, Immediate(kPointerSize));
336 __ bind(&entry); 336 __ bind(&entry);
337 __ cmpp(rcx, rax); 337 __ cmpp(rcx, rax);
338 __ j(below, &loop); 338 __ j(below, &loop);
339 } 339 }
340 340
341 // Store the initialized FixedArray into the properties field of 341 // Store the initialized FixedArray into the properties field of
342 // the JSObject 342 // the JSObject
343 // rbx: JSObject 343 // rbx: JSObject
344 // rdi: FixedArray 344 // rdi: FixedArray
345 __ or_(rdi, Immediate(kHeapObjectTag)); // add the heap tag 345 __ orp(rdi, Immediate(kHeapObjectTag)); // add the heap tag
346 __ movp(FieldOperand(rbx, JSObject::kPropertiesOffset), rdi); 346 __ movp(FieldOperand(rbx, JSObject::kPropertiesOffset), rdi);
347 347
348 348
349 // Continue with JSObject being successfully allocated 349 // Continue with JSObject being successfully allocated
350 // rbx: JSObject 350 // rbx: JSObject
351 __ jmp(&allocated); 351 __ jmp(&allocated);
352 352
353 // Undo the setting of the new top so that the heap is verifiable. For 353 // Undo the setting of the new top so that the heap is verifiable. For
354 // example, the map's unused properties potentially do not match the 354 // example, the map's unused properties potentially do not match the
355 // allocated objects unused properties. 355 // allocated objects unused properties.
(...skipping 1138 matching lines...) Expand 10 before | Expand all | Expand 10 after
1494 __ bind(&ok); 1494 __ bind(&ok);
1495 __ ret(0); 1495 __ ret(0);
1496 } 1496 }
1497 1497
1498 1498
1499 #undef __ 1499 #undef __
1500 1500
1501 } } // namespace v8::internal 1501 } } // namespace v8::internal
1502 1502
1503 #endif // V8_TARGET_ARCH_X64 1503 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/assembler-x64.cc ('k') | src/x64/code-stubs-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698