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 1066 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1077 emitq(reinterpret_cast<uintptr_t>(value), rmode); | 1077 emitq(reinterpret_cast<uintptr_t>(value), rmode); |
1078 } | 1078 } |
1079 | 1079 |
1080 | 1080 |
1081 void Assembler::movq(Register dst, int64_t value, RelocInfo::Mode rmode) { | 1081 void Assembler::movq(Register dst, int64_t value, RelocInfo::Mode rmode) { |
1082 // Non-relocatable values might not need a 64-bit representation. | 1082 // Non-relocatable values might not need a 64-bit representation. |
1083 if (rmode == RelocInfo::NONE) { | 1083 if (rmode == RelocInfo::NONE) { |
1084 // Sadly, there is no zero or sign extending move for 8-bit immediates. | 1084 // Sadly, there is no zero or sign extending move for 8-bit immediates. |
1085 if (is_int32(value)) { | 1085 if (is_int32(value)) { |
1086 movq(dst, Immediate(static_cast<int32_t>(value))); | 1086 movq(dst, Immediate(static_cast<int32_t>(value))); |
| 1087 return; |
1087 } else if (is_uint32(value)) { | 1088 } else if (is_uint32(value)) { |
1088 movl(dst, Immediate(static_cast<int32_t>(value))); | 1089 movl(dst, Immediate(static_cast<int32_t>(value))); |
| 1090 return; |
1089 } | 1091 } |
1090 // Value cannot be represented by 32 bits, so do a full 64 bit immediate | 1092 // Value cannot be represented by 32 bits, so do a full 64 bit immediate |
1091 // value. | 1093 // value. |
1092 } else { | |
1093 EnsureSpace ensure_space(this); | |
1094 last_pc_ = pc_; | |
1095 emit_rex_64(dst); | |
1096 emit(0xB8 | dst.low_bits()); | |
1097 emitq(value, rmode); | |
1098 } | 1094 } |
| 1095 EnsureSpace ensure_space(this); |
| 1096 last_pc_ = pc_; |
| 1097 emit_rex_64(dst); |
| 1098 emit(0xB8 | dst.low_bits()); |
| 1099 emitq(value, rmode); |
1099 } | 1100 } |
1100 | 1101 |
1101 | 1102 |
1102 void Assembler::movq(Register dst, ExternalReference ref) { | 1103 void Assembler::movq(Register dst, ExternalReference ref) { |
1103 EnsureSpace ensure_space(this); | 1104 EnsureSpace ensure_space(this); |
1104 last_pc_ = pc_; | 1105 last_pc_ = pc_; |
1105 emit_rex_64(dst); | 1106 emit_rex_64(dst); |
1106 emit(0xB8 | dst.low_bits()); | 1107 emit(0xB8 | dst.low_bits()); |
1107 emitq(reinterpret_cast<uintptr_t>(ref.address()), | 1108 emitq(reinterpret_cast<uintptr_t>(ref.address()), |
1108 RelocInfo::EXTERNAL_REFERENCE); | 1109 RelocInfo::EXTERNAL_REFERENCE); |
(...skipping 1066 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2175 bool BreakLocationIterator::IsDebugBreakAtReturn() { | 2176 bool BreakLocationIterator::IsDebugBreakAtReturn() { |
2176 UNIMPLEMENTED(); | 2177 UNIMPLEMENTED(); |
2177 return false; | 2178 return false; |
2178 } | 2179 } |
2179 | 2180 |
2180 void BreakLocationIterator::SetDebugBreakAtReturn() { | 2181 void BreakLocationIterator::SetDebugBreakAtReturn() { |
2181 UNIMPLEMENTED(); | 2182 UNIMPLEMENTED(); |
2182 } | 2183 } |
2183 | 2184 |
2184 } } // namespace v8::internal | 2185 } } // namespace v8::internal |
OLD | NEW |