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

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

Issue 18509003: Keep two empty lines between declarations for cpp files (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 7 years, 5 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/v8threads.cc ('k') | src/x64/builtins-x64.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 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 884 matching lines...) Expand 10 before | Expand all | Expand 10 after
895 ASSERT(is_int32(displacement)); 895 ASSERT(is_int32(displacement));
896 emitl(static_cast<int32_t>(displacement)); 896 emitl(static_cast<int32_t>(displacement));
897 } 897 }
898 898
899 899
900 void Assembler::clc() { 900 void Assembler::clc() {
901 EnsureSpace ensure_space(this); 901 EnsureSpace ensure_space(this);
902 emit(0xF8); 902 emit(0xF8);
903 } 903 }
904 904
905
905 void Assembler::cld() { 906 void Assembler::cld() {
906 EnsureSpace ensure_space(this); 907 EnsureSpace ensure_space(this);
907 emit(0xFC); 908 emit(0xFC);
908 } 909 }
909 910
911
910 void Assembler::cdq() { 912 void Assembler::cdq() {
911 EnsureSpace ensure_space(this); 913 EnsureSpace ensure_space(this);
912 emit(0x99); 914 emit(0x99);
913 } 915 }
914 916
915 917
916 void Assembler::cmovq(Condition cc, Register dst, Register src) { 918 void Assembler::cmovq(Condition cc, Register dst, Register src) {
917 if (cc == always) { 919 if (cc == always) {
918 movq(dst, src); 920 movq(dst, src);
919 } else if (cc == never) { 921 } else if (cc == never) {
(...skipping 1595 matching lines...) Expand 10 before | Expand all | Expand 10 after
2515 } 2517 }
2516 2518
2517 2519
2518 void Assembler::emit_farith(int b1, int b2, int i) { 2520 void Assembler::emit_farith(int b1, int b2, int i) {
2519 ASSERT(is_uint8(b1) && is_uint8(b2)); // wrong opcode 2521 ASSERT(is_uint8(b1) && is_uint8(b2)); // wrong opcode
2520 ASSERT(is_uint3(i)); // illegal stack offset 2522 ASSERT(is_uint3(i)); // illegal stack offset
2521 emit(b1); 2523 emit(b1);
2522 emit(b2 + i); 2524 emit(b2 + i);
2523 } 2525 }
2524 2526
2527
2525 // SSE 2 operations. 2528 // SSE 2 operations.
2526 2529
2527 void Assembler::movd(XMMRegister dst, Register src) { 2530 void Assembler::movd(XMMRegister dst, Register src) {
2528 EnsureSpace ensure_space(this); 2531 EnsureSpace ensure_space(this);
2529 emit(0x66); 2532 emit(0x66);
2530 emit_optional_rex_32(dst, src); 2533 emit_optional_rex_32(dst, src);
2531 emit(0x0F); 2534 emit(0x0F);
2532 emit(0x6E); 2535 emit(0x6E);
2533 emit_sse_operand(dst, src); 2536 emit_sse_operand(dst, src);
2534 } 2537 }
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
2575 emit_sse_operand(dst, src); 2578 emit_sse_operand(dst, src);
2576 } else { 2579 } else {
2577 emit(0x66); 2580 emit(0x66);
2578 emit_optional_rex_32(src, dst); 2581 emit_optional_rex_32(src, dst);
2579 emit(0x0F); 2582 emit(0x0F);
2580 emit(0xD6); 2583 emit(0xD6);
2581 emit_sse_operand(src, dst); 2584 emit_sse_operand(src, dst);
2582 } 2585 }
2583 } 2586 }
2584 2587
2588
2585 void Assembler::movdqa(const Operand& dst, XMMRegister src) { 2589 void Assembler::movdqa(const Operand& dst, XMMRegister src) {
2586 EnsureSpace ensure_space(this); 2590 EnsureSpace ensure_space(this);
2587 emit(0x66); 2591 emit(0x66);
2588 emit_rex_64(src, dst); 2592 emit_rex_64(src, dst);
2589 emit(0x0F); 2593 emit(0x0F);
2590 emit(0x7F); 2594 emit(0x7F);
2591 emit_sse_operand(src, dst); 2595 emit_sse_operand(src, dst);
2592 } 2596 }
2593 2597
2594 2598
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after
3028 void Assembler::emit_sse_operand(XMMRegister reg, const Operand& adr) { 3032 void Assembler::emit_sse_operand(XMMRegister reg, const Operand& adr) {
3029 Register ireg = { reg.code() }; 3033 Register ireg = { reg.code() };
3030 emit_operand(ireg, adr); 3034 emit_operand(ireg, adr);
3031 } 3035 }
3032 3036
3033 3037
3034 void Assembler::emit_sse_operand(XMMRegister dst, XMMRegister src) { 3038 void Assembler::emit_sse_operand(XMMRegister dst, XMMRegister src) {
3035 emit(0xC0 | (dst.low_bits() << 3) | src.low_bits()); 3039 emit(0xC0 | (dst.low_bits() << 3) | src.low_bits());
3036 } 3040 }
3037 3041
3042
3038 void Assembler::emit_sse_operand(XMMRegister dst, Register src) { 3043 void Assembler::emit_sse_operand(XMMRegister dst, Register src) {
3039 emit(0xC0 | (dst.low_bits() << 3) | src.low_bits()); 3044 emit(0xC0 | (dst.low_bits() << 3) | src.low_bits());
3040 } 3045 }
3041 3046
3047
3042 void Assembler::emit_sse_operand(Register dst, XMMRegister src) { 3048 void Assembler::emit_sse_operand(Register dst, XMMRegister src) {
3043 emit(0xC0 | (dst.low_bits() << 3) | src.low_bits()); 3049 emit(0xC0 | (dst.low_bits() << 3) | src.low_bits());
3044 } 3050 }
3045 3051
3046 3052
3047 void Assembler::db(uint8_t data) { 3053 void Assembler::db(uint8_t data) {
3048 EnsureSpace ensure_space(this); 3054 EnsureSpace ensure_space(this);
3049 emit(data); 3055 emit(data);
3050 } 3056 }
3051 3057
(...skipping 16 matching lines...) Expand all
3068 } 3074 }
3069 #endif 3075 #endif
3070 if (!Serializer::enabled() && !emit_debug_code()) { 3076 if (!Serializer::enabled() && !emit_debug_code()) {
3071 return; 3077 return;
3072 } 3078 }
3073 } 3079 }
3074 RelocInfo rinfo(pc_, rmode, data, NULL); 3080 RelocInfo rinfo(pc_, rmode, data, NULL);
3075 reloc_info_writer.Write(&rinfo); 3081 reloc_info_writer.Write(&rinfo);
3076 } 3082 }
3077 3083
3084
3078 void Assembler::RecordJSReturn() { 3085 void Assembler::RecordJSReturn() {
3079 positions_recorder()->WriteRecordedPositions(); 3086 positions_recorder()->WriteRecordedPositions();
3080 EnsureSpace ensure_space(this); 3087 EnsureSpace ensure_space(this);
3081 RecordRelocInfo(RelocInfo::JS_RETURN); 3088 RecordRelocInfo(RelocInfo::JS_RETURN);
3082 } 3089 }
3083 3090
3084 3091
3085 void Assembler::RecordDebugBreakSlot() { 3092 void Assembler::RecordDebugBreakSlot() {
3086 positions_recorder()->WriteRecordedPositions(); 3093 positions_recorder()->WriteRecordedPositions();
3087 EnsureSpace ensure_space(this); 3094 EnsureSpace ensure_space(this);
(...skipping 18 matching lines...) Expand all
3106 bool RelocInfo::IsCodedSpecially() { 3113 bool RelocInfo::IsCodedSpecially() {
3107 // The deserializer needs to know whether a pointer is specially coded. Being 3114 // The deserializer needs to know whether a pointer is specially coded. Being
3108 // specially coded on x64 means that it is a relative 32 bit address, as used 3115 // specially coded on x64 means that it is a relative 32 bit address, as used
3109 // by branch instructions. 3116 // by branch instructions.
3110 return (1 << rmode_) & kApplyMask; 3117 return (1 << rmode_) & kApplyMask;
3111 } 3118 }
3112 3119
3113 } } // namespace v8::internal 3120 } } // namespace v8::internal
3114 3121
3115 #endif // V8_TARGET_ARCH_X64 3122 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/v8threads.cc ('k') | src/x64/builtins-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698