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

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

Issue 7060010: Merge bleeding edge into the GC branch up to 7948. The asserts (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/gc/
Patch Set: Created 9 years, 7 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/assembler-ia32.cc ('k') | src/ia32/builtins-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 374 matching lines...) Expand 10 before | Expand all | Expand 10 after
385 } 385 }
386 386
387 387
388 void Assembler::emit_disp(Label* L, Displacement::Type type) { 388 void Assembler::emit_disp(Label* L, Displacement::Type type) {
389 Displacement disp(L, type); 389 Displacement disp(L, type);
390 L->link_to(pc_offset()); 390 L->link_to(pc_offset());
391 emit(static_cast<int>(disp.data())); 391 emit(static_cast<int>(disp.data()));
392 } 392 }
393 393
394 394
395 void Assembler::emit_near_disp(Label* L) {
396 byte disp = 0x00;
397 if (L->is_near_linked()) {
398 int offset = L->near_link_pos() - pc_offset();
399 ASSERT(is_int8(offset));
400 disp = static_cast<byte>(offset & 0xFF);
401 }
402 L->link_to(pc_offset(), Label::kNear);
403 *pc_++ = disp;
404 }
405
406
395 void Operand::set_modrm(int mod, Register rm) { 407 void Operand::set_modrm(int mod, Register rm) {
396 ASSERT((mod & -4) == 0); 408 ASSERT((mod & -4) == 0);
397 buf_[0] = mod << 6 | rm.code(); 409 buf_[0] = mod << 6 | rm.code();
398 len_ = 1; 410 len_ = 1;
399 } 411 }
400 412
401 413
402 void Operand::set_sib(ScaleFactor scale, Register index, Register base) { 414 void Operand::set_sib(ScaleFactor scale, Register index, Register base) {
403 ASSERT(len_ == 1); 415 ASSERT(len_ == 1);
404 ASSERT((scale & -4) == 0); 416 ASSERT((scale & -4) == 0);
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
437 449
438 Operand::Operand(int32_t disp, RelocInfo::Mode rmode) { 450 Operand::Operand(int32_t disp, RelocInfo::Mode rmode) {
439 // [disp/r] 451 // [disp/r]
440 set_modrm(0, ebp); 452 set_modrm(0, ebp);
441 set_dispr(disp, rmode); 453 set_dispr(disp, rmode);
442 } 454 }
443 455
444 } } // namespace v8::internal 456 } } // namespace v8::internal
445 457
446 #endif // V8_IA32_ASSEMBLER_IA32_INL_H_ 458 #endif // V8_IA32_ASSEMBLER_IA32_INL_H_
OLDNEW
« no previous file with comments | « src/ia32/assembler-ia32.cc ('k') | src/ia32/builtins-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698