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

Side by Side Diff: src/x64/macro-assembler-x64.cc

Issue 47533002: Use nearlabel AFAP in lithium codegen (Closed) Base URL: git://github.com/v8/v8.git@master
Patch Set: fixed x64 assert fail Created 7 years, 1 month 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
« no previous file with comments | « src/x64/macro-assembler-x64.h ('k') | no next file » | 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 3017 matching lines...) Expand 10 before | Expand all | Expand 10 after
3028 // Preserve original value. 3028 // Preserve original value.
3029 SmiToInteger32(kScratchRegister, maybe_number); 3029 SmiToInteger32(kScratchRegister, maybe_number);
3030 Cvtlsi2sd(xmm_scratch, kScratchRegister); 3030 Cvtlsi2sd(xmm_scratch, kScratchRegister);
3031 movsd(FieldOperand(elements, index, times_8, 3031 movsd(FieldOperand(elements, index, times_8,
3032 FixedDoubleArray::kHeaderSize - elements_offset), 3032 FixedDoubleArray::kHeaderSize - elements_offset),
3033 xmm_scratch); 3033 xmm_scratch);
3034 bind(&done); 3034 bind(&done);
3035 } 3035 }
3036 3036
3037 3037
3038 void MacroAssembler::CompareMap(Register obj, 3038 void MacroAssembler::CompareMap(Register obj, Handle<Map> map) {
3039 Handle<Map> map,
3040 Label* early_success) {
3041 Cmp(FieldOperand(obj, HeapObject::kMapOffset), map); 3039 Cmp(FieldOperand(obj, HeapObject::kMapOffset), map);
3042 } 3040 }
3043 3041
3044 3042
3045 void MacroAssembler::CheckMap(Register obj, 3043 void MacroAssembler::CheckMap(Register obj,
3046 Handle<Map> map, 3044 Handle<Map> map,
3047 Label* fail, 3045 Label* fail,
3048 SmiCheckType smi_check_type) { 3046 SmiCheckType smi_check_type) {
3049 if (smi_check_type == DO_SMI_CHECK) { 3047 if (smi_check_type == DO_SMI_CHECK) {
3050 JumpIfSmi(obj, fail); 3048 JumpIfSmi(obj, fail);
3051 } 3049 }
3052 3050
3053 Label success; 3051 CompareMap(obj, map);
3054 CompareMap(obj, map, &success);
3055 j(not_equal, fail); 3052 j(not_equal, fail);
3056 bind(&success);
3057 } 3053 }
3058 3054
3059 3055
3060 void MacroAssembler::ClampUint8(Register reg) { 3056 void MacroAssembler::ClampUint8(Register reg) {
3061 Label done; 3057 Label done;
3062 testl(reg, Immediate(0xFFFFFF00)); 3058 testl(reg, Immediate(0xFFFFFF00));
3063 j(zero, &done, Label::kNear); 3059 j(zero, &done, Label::kNear);
3064 setcc(negative, reg); // 1 if negative, 0 if positive. 3060 setcc(negative, reg); // 1 if negative, 0 if positive.
3065 decb(reg); // 0 if negative, 255 if positive. 3061 decb(reg); // 0 if negative, 255 if positive.
3066 bind(&done); 3062 bind(&done);
(...skipping 1940 matching lines...) Expand 10 before | Expand all | Expand 10 after
5007 j(equal, found); 5003 j(equal, found);
5008 movq(current, FieldOperand(current, Map::kPrototypeOffset)); 5004 movq(current, FieldOperand(current, Map::kPrototypeOffset));
5009 CompareRoot(current, Heap::kNullValueRootIndex); 5005 CompareRoot(current, Heap::kNullValueRootIndex);
5010 j(not_equal, &loop_again); 5006 j(not_equal, &loop_again);
5011 } 5007 }
5012 5008
5013 5009
5014 } } // namespace v8::internal 5010 } } // namespace v8::internal
5015 5011
5016 #endif // V8_TARGET_ARCH_X64 5012 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/macro-assembler-x64.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698