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

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

Issue 66553004: Revert "Add signed/unsigned 8-bit and 16-bit Representations to Crankshaft" (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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 | Annotate | Revision Log
« no previous file with comments | « src/ia32/macro-assembler-ia32.h ('k') | src/property-details.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 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 allow_stub_calls_(true), 49 allow_stub_calls_(true),
50 has_frame_(false) { 50 has_frame_(false) {
51 if (isolate() != NULL) { 51 if (isolate() != NULL) {
52 // TODO(titzer): should we just use a null handle here instead? 52 // TODO(titzer): should we just use a null handle here instead?
53 code_object_ = Handle<Object>(isolate()->heap()->undefined_value(), 53 code_object_ = Handle<Object>(isolate()->heap()->undefined_value(),
54 isolate()); 54 isolate());
55 } 55 }
56 } 56 }
57 57
58 58
59 void MacroAssembler::Load(Register dst, const Operand& src, Representation r) {
60 ASSERT(!r.IsDouble());
61 if (r.IsInteger8()) {
62 movsx_b(dst, src);
63 } else if (r.IsUInteger8()) {
64 movzx_b(dst, src);
65 } else if (r.IsInteger16()) {
66 movsx_w(dst, src);
67 } else if (r.IsUInteger16()) {
68 movzx_w(dst, src);
69 } else {
70 mov(dst, src);
71 }
72 }
73
74
75 void MacroAssembler::Store(Register src, const Operand& dst, Representation r) {
76 ASSERT(!r.IsDouble());
77 if (r.IsInteger8() || r.IsUInteger8()) {
78 mov_b(dst, src);
79 } else if (r.IsInteger16() || r.IsUInteger16()) {
80 mov_w(dst, src);
81 } else {
82 mov(dst, src);
83 }
84 }
85
86
87 void MacroAssembler::LoadRoot(Register destination, Heap::RootListIndex index) { 59 void MacroAssembler::LoadRoot(Register destination, Heap::RootListIndex index) {
88 if (isolate()->heap()->RootCanBeTreatedAsConstant(index)) { 60 if (isolate()->heap()->RootCanBeTreatedAsConstant(index)) {
89 Handle<Object> value(&isolate()->heap()->roots_array_start()[index]); 61 Handle<Object> value(&isolate()->heap()->roots_array_start()[index]);
90 mov(destination, value); 62 mov(destination, value);
91 return; 63 return;
92 } 64 }
93 ExternalReference roots_array_start = 65 ExternalReference roots_array_start =
94 ExternalReference::roots_array_start(isolate()); 66 ExternalReference::roots_array_start(isolate());
95 mov(destination, Immediate(index)); 67 mov(destination, Immediate(index));
96 mov(destination, Operand::StaticArray(destination, 68 mov(destination, Operand::StaticArray(destination,
(...skipping 3500 matching lines...) Expand 10 before | Expand all | Expand 10 after
3597 cmp(scratch1, Immediate(DICTIONARY_ELEMENTS)); 3569 cmp(scratch1, Immediate(DICTIONARY_ELEMENTS));
3598 j(equal, found); 3570 j(equal, found);
3599 mov(current, FieldOperand(current, Map::kPrototypeOffset)); 3571 mov(current, FieldOperand(current, Map::kPrototypeOffset));
3600 cmp(current, Immediate(factory->null_value())); 3572 cmp(current, Immediate(factory->null_value()));
3601 j(not_equal, &loop_again); 3573 j(not_equal, &loop_again);
3602 } 3574 }
3603 3575
3604 } } // namespace v8::internal 3576 } } // namespace v8::internal
3605 3577
3606 #endif // V8_TARGET_ARCH_IA32 3578 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/macro-assembler-ia32.h ('k') | src/property-details.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698