OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 851 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
862 L->link_to(pc_offset() - sizeof(int32_t)); | 862 L->link_to(pc_offset() - sizeof(int32_t)); |
863 } else { | 863 } else { |
864 ASSERT(L->is_unused()); | 864 ASSERT(L->is_unused()); |
865 int32_t current = pc_offset(); | 865 int32_t current = pc_offset(); |
866 emitl(current); | 866 emitl(current); |
867 L->link_to(current); | 867 L->link_to(current); |
868 } | 868 } |
869 } | 869 } |
870 | 870 |
871 | 871 |
872 void Assembler::call(Handle<Code> target, | 872 void Assembler::call(Handle<Code> target, RelocInfo::Mode rmode) { |
873 RelocInfo::Mode rmode, | |
874 unsigned ast_id) { | |
875 positions_recorder()->WriteRecordedPositions(); | 873 positions_recorder()->WriteRecordedPositions(); |
876 EnsureSpace ensure_space(this); | 874 EnsureSpace ensure_space(this); |
877 // 1110 1000 #32-bit disp. | 875 // 1110 1000 #32-bit disp. |
878 emit(0xE8); | 876 emit(0xE8); |
879 emit_code_target(target, rmode, ast_id); | 877 emit_code_target(target, rmode); |
880 } | 878 } |
881 | 879 |
882 | 880 |
883 void Assembler::call(Register adr) { | 881 void Assembler::call(Register adr) { |
884 positions_recorder()->WriteRecordedPositions(); | 882 positions_recorder()->WriteRecordedPositions(); |
885 EnsureSpace ensure_space(this); | 883 EnsureSpace ensure_space(this); |
886 // Opcode: FF /2 r64. | 884 // Opcode: FF /2 r64. |
887 emit_optional_rex_32(adr); | 885 emit_optional_rex_32(adr); |
888 emit(0xFF); | 886 emit(0xFF); |
889 emit_modrm(0x2, adr); | 887 emit_modrm(0x2, adr); |
(...skipping 2144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3034 // specially coded on x64 means that it is a relative 32 bit address, as used | 3032 // specially coded on x64 means that it is a relative 32 bit address, as used |
3035 // by branch instructions. | 3033 // by branch instructions. |
3036 return (1 << rmode_) & kApplyMask; | 3034 return (1 << rmode_) & kApplyMask; |
3037 } | 3035 } |
3038 | 3036 |
3039 | 3037 |
3040 | 3038 |
3041 } } // namespace v8::internal | 3039 } } // namespace v8::internal |
3042 | 3040 |
3043 #endif // V8_TARGET_ARCH_X64 | 3041 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |