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

Side by Side Diff: src/ia32/codegen-ia32.cc

Issue 173561: Reverting 2768. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 3 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/ia32/codegen-ia32.h ('k') | src/ia32/codegen-ia32-inl.h » ('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 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 6929 matching lines...) Expand 10 before | Expand all | Expand 10 after
6940 UNREACHABLE(); 6940 UNREACHABLE();
6941 } 6941 }
6942 } 6942 }
6943 6943
6944 6944
6945 void FloatingPointHelper::AllocateHeapNumber(MacroAssembler* masm, 6945 void FloatingPointHelper::AllocateHeapNumber(MacroAssembler* masm,
6946 Label* need_gc, 6946 Label* need_gc,
6947 Register scratch1, 6947 Register scratch1,
6948 Register scratch2, 6948 Register scratch2,
6949 Register result) { 6949 Register result) {
6950 // Allocate heap number in new space. 6950 ExternalReference allocation_top =
6951 __ AllocateObjectInNewSpace(HeapNumber::kSize, 6951 ExternalReference::new_space_allocation_top_address();
6952 result, 6952 ExternalReference allocation_limit =
6953 scratch1, 6953 ExternalReference::new_space_allocation_limit_address();
6954 scratch2, 6954 __ mov(Operand(scratch1), Immediate(allocation_top));
6955 need_gc, 6955 __ mov(result, Operand(scratch1, 0));
6956 false); 6956 __ lea(scratch2, Operand(result, HeapNumber::kSize)); // scratch2: new top
6957 6957 __ cmp(scratch2, Operand::StaticVariable(allocation_limit));
6958 // Set the map and tag the result. 6958 __ j(above, need_gc, not_taken);
6959
6960 __ mov(Operand(scratch1, 0), scratch2); // store new top
6959 __ mov(Operand(result, HeapObject::kMapOffset), 6961 __ mov(Operand(result, HeapObject::kMapOffset),
6960 Immediate(Factory::heap_number_map())); 6962 Immediate(Factory::heap_number_map()));
6961 __ or_(Operand(result), Immediate(kHeapObjectTag)); 6963 // Tag old top and use as result.
6964 __ add(Operand(result), Immediate(kHeapObjectTag));
6962 } 6965 }
6963 6966
6964 6967
6965 void FloatingPointHelper::LoadFloatOperand(MacroAssembler* masm, 6968 void FloatingPointHelper::LoadFloatOperand(MacroAssembler* masm,
6966 Register number) { 6969 Register number) {
6967 Label load_smi, done; 6970 Label load_smi, done;
6968 6971
6969 __ test(number, Immediate(kSmiTagMask)); 6972 __ test(number, Immediate(kSmiTagMask));
6970 __ j(zero, &load_smi, not_taken); 6973 __ j(zero, &load_smi, not_taken);
6971 __ fld_d(FieldOperand(number, HeapNumber::kValueOffset)); 6974 __ fld_d(FieldOperand(number, HeapNumber::kValueOffset));
(...skipping 897 matching lines...) Expand 10 before | Expand all | Expand 10 after
7869 7872
7870 int CompareStub::MinorKey() { 7873 int CompareStub::MinorKey() {
7871 // Encode the two parameters in a unique 16 bit value. 7874 // Encode the two parameters in a unique 16 bit value.
7872 ASSERT(static_cast<unsigned>(cc_) < (1 << 15)); 7875 ASSERT(static_cast<unsigned>(cc_) < (1 << 15));
7873 return (static_cast<unsigned>(cc_) << 1) | (strict_ ? 1 : 0); 7876 return (static_cast<unsigned>(cc_) << 1) | (strict_ ? 1 : 0);
7874 } 7877 }
7875 7878
7876 #undef __ 7879 #undef __
7877 7880
7878 } } // namespace v8::internal 7881 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ia32/codegen-ia32.h ('k') | src/ia32/codegen-ia32-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698