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

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

Issue 18656: Avoid memmove when emitting operands in the assembler ... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 11 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 | « no previous file | src/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 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 ScaleFactor scale, 253 ScaleFactor scale,
254 const ExternalReference& arr) { 254 const ExternalReference& arr) {
255 return Operand(index, scale, reinterpret_cast<int32_t>(arr.address()), 255 return Operand(index, scale, reinterpret_cast<int32_t>(arr.address()),
256 RelocInfo::EXTERNAL_REFERENCE); 256 RelocInfo::EXTERNAL_REFERENCE);
257 } 257 }
258 258
259 // Returns true if this Operand is a wrapper for the specified register. 259 // Returns true if this Operand is a wrapper for the specified register.
260 bool is_reg(Register reg) const; 260 bool is_reg(Register reg) const;
261 261
262 private: 262 private:
263 // Mutable because reg in ModR/M byte is set by Assembler via set_reg(). 263 byte buf_[6];
264 mutable byte buf_[6];
265 // The number of bytes in buf_. 264 // The number of bytes in buf_.
266 unsigned int len_; 265 unsigned int len_;
267 // Only valid if len_ > 4. 266 // Only valid if len_ > 4.
268 RelocInfo::Mode rmode_; 267 RelocInfo::Mode rmode_;
269 268
270 inline void set_modrm(int mod, // reg == 0 269 // Set the ModRM byte without an encoded 'reg' register. The
271 Register rm); 270 // register is encoded later as part of the emit_operand operation.
271 inline void set_modrm(int mod, Register rm);
272
272 inline void set_sib(ScaleFactor scale, Register index, Register base); 273 inline void set_sib(ScaleFactor scale, Register index, Register base);
273 inline void set_disp8(int8_t disp); 274 inline void set_disp8(int8_t disp);
274 inline void set_dispr(int32_t disp, RelocInfo::Mode rmode); 275 inline void set_dispr(int32_t disp, RelocInfo::Mode rmode);
275 inline void set_reg(Register reg) const;
276 276
277 friend class Assembler; 277 friend class Assembler;
278 }; 278 };
279 279
280 280
281 // ----------------------------------------------------------------------------- 281 // -----------------------------------------------------------------------------
282 // A Displacement describes the 32bit immediate field of an instruction which 282 // A Displacement describes the 32bit immediate field of an instruction which
283 // may be used together with a Label in order to refer to a yet unknown code 283 // may be used together with a Label in order to refer to a yet unknown code
284 // position. Displacements stored in the instruction stream are used to describe 284 // position. Displacements stored in the instruction stream are used to describe
285 // the instruction and to chain a list of instructions using the same Label. 285 // the instruction and to chain a list of instructions using the same Label.
(...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after
830 private: 830 private:
831 Assembler* assembler_; 831 Assembler* assembler_;
832 #ifdef DEBUG 832 #ifdef DEBUG
833 int space_before_; 833 int space_before_;
834 #endif 834 #endif
835 }; 835 };
836 836
837 } } // namespace v8::internal 837 } } // namespace v8::internal
838 838
839 #endif // V8_ASSEMBLER_IA32_H_ 839 #endif // V8_ASSEMBLER_IA32_H_
OLDNEW
« no previous file with comments | « no previous file | src/assembler-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698