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

Side by Side Diff: src/ia32/assembler-ia32.h

Issue 6713074: Require an isolate parameter for most external reference creation to (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Further cleanup Created 9 years, 9 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/assembler.cc ('k') | src/ia32/assembler-ia32.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 (c) 1994-2006 Sun Microsystems Inc. 1 // Copyright (c) 1994-2006 Sun Microsystems Inc.
2 // All Rights Reserved. 2 // All Rights Reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions are 5 // modification, are permitted provided that the following conditions are
6 // met: 6 // met:
7 // 7 //
8 // - Redistributions of source code must retain the above copyright notice, 8 // - Redistributions of source code must retain the above copyright notice,
9 // this list of conditions and the following disclaimer. 9 // this list of conditions and the following disclaimer.
10 // 10 //
(...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after
501 uint64_t supported_; 501 uint64_t supported_;
502 uint64_t enabled_; 502 uint64_t enabled_;
503 uint64_t found_by_runtime_probing_; 503 uint64_t found_by_runtime_probing_;
504 504
505 friend class Isolate; 505 friend class Isolate;
506 506
507 DISALLOW_COPY_AND_ASSIGN(CpuFeatures); 507 DISALLOW_COPY_AND_ASSIGN(CpuFeatures);
508 }; 508 };
509 509
510 510
511 class Assembler : public Malloced { 511 class Assembler : public AssemblerBase {
512 private: 512 private:
513 // We check before assembling an instruction that there is sufficient 513 // We check before assembling an instruction that there is sufficient
514 // space to write an instruction and its relocation information. 514 // space to write an instruction and its relocation information.
515 // The relocation writer's position must be kGap bytes above the end of 515 // The relocation writer's position must be kGap bytes above the end of
516 // the generated instructions. This leaves enough space for the 516 // the generated instructions. This leaves enough space for the
517 // longest possible ia32 instruction, 15 bytes, and the longest possible 517 // longest possible ia32 instruction, 15 bytes, and the longest possible
518 // relocation information encoding, RelocInfoWriter::kMaxLength == 16. 518 // relocation information encoding, RelocInfoWriter::kMaxLength == 16.
519 // (There is a 15 byte limit on ia32 instruction length that rules out some 519 // (There is a 15 byte limit on ia32 instruction length that rules out some
520 // otherwise valid instructions.) 520 // otherwise valid instructions.)
521 // This allows for a single, fast space check per instruction. 521 // This allows for a single, fast space check per instruction.
(...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after
1003 protected: 1003 protected:
1004 bool emit_debug_code() const { return emit_debug_code_; } 1004 bool emit_debug_code() const { return emit_debug_code_; }
1005 1005
1006 void movsd(XMMRegister dst, const Operand& src); 1006 void movsd(XMMRegister dst, const Operand& src);
1007 void movsd(const Operand& dst, XMMRegister src); 1007 void movsd(const Operand& dst, XMMRegister src);
1008 1008
1009 void emit_sse_operand(XMMRegister reg, const Operand& adr); 1009 void emit_sse_operand(XMMRegister reg, const Operand& adr);
1010 void emit_sse_operand(XMMRegister dst, XMMRegister src); 1010 void emit_sse_operand(XMMRegister dst, XMMRegister src);
1011 void emit_sse_operand(Register dst, XMMRegister src); 1011 void emit_sse_operand(Register dst, XMMRegister src);
1012 1012
1013 byte* addr_at(int pos) { return buffer_ + pos; } 1013 byte* addr_at(int pos) { return buffer_ + pos; }
1014
1014 private: 1015 private:
1015 byte byte_at(int pos) { return buffer_[pos]; } 1016 byte byte_at(int pos) { return buffer_[pos]; }
1016 void set_byte_at(int pos, byte value) { buffer_[pos] = value; } 1017 void set_byte_at(int pos, byte value) { buffer_[pos] = value; }
1017 uint32_t long_at(int pos) { 1018 uint32_t long_at(int pos) {
1018 return *reinterpret_cast<uint32_t*>(addr_at(pos)); 1019 return *reinterpret_cast<uint32_t*>(addr_at(pos));
1019 } 1020 }
1020 void long_at_put(int pos, uint32_t x) { 1021 void long_at_put(int pos, uint32_t x) {
1021 *reinterpret_cast<uint32_t*>(addr_at(pos)) = x; 1022 *reinterpret_cast<uint32_t*>(addr_at(pos)) = x;
1022 } 1023 }
1023 1024
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
1105 private: 1106 private:
1106 Assembler* assembler_; 1107 Assembler* assembler_;
1107 #ifdef DEBUG 1108 #ifdef DEBUG
1108 int space_before_; 1109 int space_before_;
1109 #endif 1110 #endif
1110 }; 1111 };
1111 1112
1112 } } // namespace v8::internal 1113 } } // namespace v8::internal
1113 1114
1114 #endif // V8_IA32_ASSEMBLER_IA32_H_ 1115 #endif // V8_IA32_ASSEMBLER_IA32_H_
OLDNEW
« no previous file with comments | « src/assembler.cc ('k') | src/ia32/assembler-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698