| OLD | NEW |
| 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 672 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 683 | 683 |
| 684 // Shifts src:dst right by cl bits, affecting only dst. | 684 // Shifts src:dst right by cl bits, affecting only dst. |
| 685 void shrd(Register dst, Register src); | 685 void shrd(Register dst, Register src); |
| 686 | 686 |
| 687 // Shifts dst right, duplicating sign bit, by shift_amount bits. | 687 // Shifts dst right, duplicating sign bit, by shift_amount bits. |
| 688 // Shifting by 1 is handled efficiently. | 688 // Shifting by 1 is handled efficiently. |
| 689 void sar(Register dst, Immediate shift_amount) { | 689 void sar(Register dst, Immediate shift_amount) { |
| 690 shift(dst, shift_amount, 0x7); | 690 shift(dst, shift_amount, 0x7); |
| 691 } | 691 } |
| 692 | 692 |
| 693 // Shifts dst right, duplicating sign bit, by shift_amount bits. |
| 694 // Shifting by 1 is handled efficiently. |
| 695 void sarl(Register dst, Immediate shift_amount) { |
| 696 shift_32(dst, shift_amount, 0x7); |
| 697 } |
| 698 |
| 693 // Shifts dst right, duplicating sign bit, by cl % 64 bits. | 699 // Shifts dst right, duplicating sign bit, by cl % 64 bits. |
| 694 void sar(Register dst) { | 700 void sar(Register dst) { |
| 695 shift(dst, 0x7); | 701 shift(dst, 0x7); |
| 696 } | 702 } |
| 697 | 703 |
| 704 // Shifts dst right, duplicating sign bit, by cl % 64 bits. |
| 705 void sarl(Register dst) { |
| 706 shift_32(dst, 0x7); |
| 707 } |
| 708 |
| 698 void shl(Register dst, Immediate shift_amount) { | 709 void shl(Register dst, Immediate shift_amount) { |
| 699 shift(dst, shift_amount, 0x4); | 710 shift(dst, shift_amount, 0x4); |
| 700 } | 711 } |
| 701 | 712 |
| 702 void shl(Register dst) { | 713 void shl(Register dst) { |
| 703 shift(dst, 0x4); | 714 shift(dst, 0x4); |
| 704 } | 715 } |
| 705 | 716 |
| 706 void shll(Register dst) { | 717 void shll(Register dst) { |
| 707 shift_32(dst, 0x4); | 718 shift_32(dst, 0x4); |
| (...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1116 Immediate src); | 1127 Immediate src); |
| 1117 // Operate on a byte in memory or register. | 1128 // Operate on a byte in memory or register. |
| 1118 void immediate_arithmetic_op_8(byte subcode, | 1129 void immediate_arithmetic_op_8(byte subcode, |
| 1119 const Operand& dst, | 1130 const Operand& dst, |
| 1120 Immediate src); | 1131 Immediate src); |
| 1121 void immediate_arithmetic_op_8(byte subcode, | 1132 void immediate_arithmetic_op_8(byte subcode, |
| 1122 Register dst, | 1133 Register dst, |
| 1123 Immediate src); | 1134 Immediate src); |
| 1124 // Emit machine code for a shift operation. | 1135 // Emit machine code for a shift operation. |
| 1125 void shift(Register dst, Immediate shift_amount, int subcode); | 1136 void shift(Register dst, Immediate shift_amount, int subcode); |
| 1137 void shift_32(Register dst, Immediate shift_amount, int subcode); |
| 1126 // Shift dst by cl % 64 bits. | 1138 // Shift dst by cl % 64 bits. |
| 1127 void shift(Register dst, int subcode); | 1139 void shift(Register dst, int subcode); |
| 1128 void shift_32(Register dst, int subcode); | 1140 void shift_32(Register dst, int subcode); |
| 1129 | 1141 |
| 1130 void emit_farith(int b1, int b2, int i); | 1142 void emit_farith(int b1, int b2, int i); |
| 1131 | 1143 |
| 1132 // labels | 1144 // labels |
| 1133 // void print(Label* L); | 1145 // void print(Label* L); |
| 1134 void bind_to(Label* L, int pos); | 1146 void bind_to(Label* L, int pos); |
| 1135 void link_to(Label* L, Label* appendix); | 1147 void link_to(Label* L, Label* appendix); |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1187 private: | 1199 private: |
| 1188 Assembler* assembler_; | 1200 Assembler* assembler_; |
| 1189 #ifdef DEBUG | 1201 #ifdef DEBUG |
| 1190 int space_before_; | 1202 int space_before_; |
| 1191 #endif | 1203 #endif |
| 1192 }; | 1204 }; |
| 1193 | 1205 |
| 1194 } } // namespace v8::internal | 1206 } } // namespace v8::internal |
| 1195 | 1207 |
| 1196 #endif // V8_X64_ASSEMBLER_X64_H_ | 1208 #endif // V8_X64_ASSEMBLER_X64_H_ |
| OLD | NEW |