Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 898 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 909 positions_recorder()->WriteRecordedPositions(); | 909 positions_recorder()->WriteRecordedPositions(); |
| 910 EnsureSpace ensure_space(this); | 910 EnsureSpace ensure_space(this); |
| 911 last_pc_ = pc_; | 911 last_pc_ = pc_; |
| 912 // Opcode: FF /2 m64. | 912 // Opcode: FF /2 m64. |
| 913 emit_optional_rex_32(op); | 913 emit_optional_rex_32(op); |
| 914 emit(0xFF); | 914 emit(0xFF); |
| 915 emit_operand(0x2, op); | 915 emit_operand(0x2, op); |
| 916 } | 916 } |
| 917 | 917 |
| 918 | 918 |
| 919 void Assembler::call(Address target) { | |
|
Kevin Millikin (Chromium)
2011/02/04 11:34:54
Since this function is not entirely safe, the comm
Lasse Reichstein
2011/02/04 12:32:13
Comment moved.
The RelocInfo::Mode is a little tr
Kevin Millikin (Chromium)
2011/02/04 12:58:24
To be clear, I thought the comment should be dupli
Lasse Reichstein
2011/02/04 13:04:11
My bad. That was indeed what I did, but not what I
| |
| 920 positions_recorder()->WriteRecordedPositions(); | |
| 921 EnsureSpace ensure_space(this); | |
| 922 last_pc_ = pc_; | |
| 923 // 1110 1000 #32-bit disp. | |
| 924 emit(0xE8); | |
| 925 Address source = pc_ + 4; | |
| 926 intptr_t displacement = target - source; | |
| 927 ASSERT(is_int32(displacement)); | |
| 928 emitl(static_cast<int32_t>(displacement)); | |
| 929 } | |
| 930 | |
| 931 | |
| 919 void Assembler::clc() { | 932 void Assembler::clc() { |
| 920 EnsureSpace ensure_space(this); | 933 EnsureSpace ensure_space(this); |
| 921 last_pc_ = pc_; | 934 last_pc_ = pc_; |
| 922 emit(0xF8); | 935 emit(0xF8); |
| 923 } | 936 } |
| 924 | 937 |
| 925 void Assembler::cdq() { | 938 void Assembler::cdq() { |
| 926 EnsureSpace ensure_space(this); | 939 EnsureSpace ensure_space(this); |
| 927 last_pc_ = pc_; | 940 last_pc_ = pc_; |
| 928 emit(0x99); | 941 emit(0x99); |
| (...skipping 2160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3089 // specially coded on x64 means that it is a relative 32 bit address, as used | 3102 // specially coded on x64 means that it is a relative 32 bit address, as used |
| 3090 // by branch instructions. | 3103 // by branch instructions. |
| 3091 return (1 << rmode_) & kApplyMask; | 3104 return (1 << rmode_) & kApplyMask; |
| 3092 } | 3105 } |
| 3093 | 3106 |
| 3094 | 3107 |
| 3095 | 3108 |
| 3096 } } // namespace v8::internal | 3109 } } // namespace v8::internal |
| 3097 | 3110 |
| 3098 #endif // V8_TARGET_ARCH_X64 | 3111 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |