OLD | NEW |
1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 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 895 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
906 | 906 |
907 void Assembler::decl(const Operand& dst) { | 907 void Assembler::decl(const Operand& dst) { |
908 EnsureSpace ensure_space(this); | 908 EnsureSpace ensure_space(this); |
909 last_pc_ = pc_; | 909 last_pc_ = pc_; |
910 emit_optional_rex_32(dst); | 910 emit_optional_rex_32(dst); |
911 emit(0xFF); | 911 emit(0xFF); |
912 emit_operand(1, dst); | 912 emit_operand(1, dst); |
913 } | 913 } |
914 | 914 |
915 | 915 |
| 916 void Assembler::decb(Register dst) { |
| 917 EnsureSpace ensure_space(this); |
| 918 last_pc_ = pc_; |
| 919 if (dst.code() > 3) { |
| 920 // Register is not one of al, bl, cl, dl. Its encoding needs REX. |
| 921 emit_rex_32(dst); |
| 922 } |
| 923 emit(0xFE); |
| 924 emit_modrm(0x1, dst); |
| 925 } |
| 926 |
| 927 |
| 928 void Assembler::decb(const Operand& dst) { |
| 929 EnsureSpace ensure_space(this); |
| 930 last_pc_ = pc_; |
| 931 emit_optional_rex_32(dst); |
| 932 emit(0xFE); |
| 933 emit_operand(1, dst); |
| 934 } |
| 935 |
| 936 |
916 void Assembler::enter(Immediate size) { | 937 void Assembler::enter(Immediate size) { |
917 EnsureSpace ensure_space(this); | 938 EnsureSpace ensure_space(this); |
918 last_pc_ = pc_; | 939 last_pc_ = pc_; |
919 emit(0xC8); | 940 emit(0xC8); |
920 emitw(size.value_); // 16 bit operand, always. | 941 emitw(size.value_); // 16 bit operand, always. |
921 emit(0); | 942 emit(0); |
922 } | 943 } |
923 | 944 |
924 | 945 |
925 void Assembler::hlt() { | 946 void Assembler::hlt() { |
(...skipping 1491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2417 written_position_ = current_position_; | 2438 written_position_ = current_position_; |
2418 } | 2439 } |
2419 } | 2440 } |
2420 | 2441 |
2421 | 2442 |
2422 const int RelocInfo::kApplyMask = RelocInfo::kCodeTargetMask | | 2443 const int RelocInfo::kApplyMask = RelocInfo::kCodeTargetMask | |
2423 1 << RelocInfo::INTERNAL_REFERENCE | | 2444 1 << RelocInfo::INTERNAL_REFERENCE | |
2424 1 << RelocInfo::JS_RETURN; | 2445 1 << RelocInfo::JS_RETURN; |
2425 | 2446 |
2426 } } // namespace v8::internal | 2447 } } // namespace v8::internal |
OLD | NEW |