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 1237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1248 } | 1248 } |
1249 | 1249 |
1250 void Assembler::movb(const Operand& dst, Register src) { | 1250 void Assembler::movb(const Operand& dst, Register src) { |
1251 EnsureSpace ensure_space(this); | 1251 EnsureSpace ensure_space(this); |
1252 last_pc_ = pc_; | 1252 last_pc_ = pc_; |
1253 emit_rex_32(src, dst); | 1253 emit_rex_32(src, dst); |
1254 emit(0x88); | 1254 emit(0x88); |
1255 emit_operand(src, dst); | 1255 emit_operand(src, dst); |
1256 } | 1256 } |
1257 | 1257 |
| 1258 void Assembler::movw(const Operand& dst, Register src) { |
| 1259 EnsureSpace ensure_space(this); |
| 1260 last_pc_ = pc_; |
| 1261 emit(0x66); |
| 1262 emit_optional_rex_32(src, dst); |
| 1263 emit(0x89); |
| 1264 emit_operand(src, dst); |
| 1265 } |
| 1266 |
1258 void Assembler::movl(Register dst, const Operand& src) { | 1267 void Assembler::movl(Register dst, const Operand& src) { |
1259 EnsureSpace ensure_space(this); | 1268 EnsureSpace ensure_space(this); |
1260 last_pc_ = pc_; | 1269 last_pc_ = pc_; |
1261 emit_optional_rex_32(dst, src); | 1270 emit_optional_rex_32(dst, src); |
1262 emit(0x8B); | 1271 emit(0x8B); |
1263 emit_operand(dst, src); | 1272 emit_operand(dst, src); |
1264 } | 1273 } |
1265 | 1274 |
1266 | 1275 |
1267 void Assembler::movl(Register dst, Register src) { | 1276 void Assembler::movl(Register dst, Register src) { |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1432 last_pc_ = pc_; | 1441 last_pc_ = pc_; |
1433 ASSERT(value->IsHeapObject()); | 1442 ASSERT(value->IsHeapObject()); |
1434 ASSERT(!Heap::InNewSpace(*value)); | 1443 ASSERT(!Heap::InNewSpace(*value)); |
1435 emit_rex_64(dst); | 1444 emit_rex_64(dst); |
1436 emit(0xB8 | dst.low_bits()); | 1445 emit(0xB8 | dst.low_bits()); |
1437 emitq(reinterpret_cast<uintptr_t>(value.location()), mode); | 1446 emitq(reinterpret_cast<uintptr_t>(value.location()), mode); |
1438 } | 1447 } |
1439 } | 1448 } |
1440 | 1449 |
1441 | 1450 |
| 1451 void Assembler::movsxbq(Register dst, const Operand& src) { |
| 1452 EnsureSpace ensure_space(this); |
| 1453 last_pc_ = pc_; |
| 1454 emit_rex_32(dst, src); |
| 1455 emit(0x0F); |
| 1456 emit(0xBE); |
| 1457 emit_operand(dst, src); |
| 1458 } |
| 1459 |
| 1460 |
| 1461 void Assembler::movsxwq(Register dst, const Operand& src) { |
| 1462 EnsureSpace ensure_space(this); |
| 1463 last_pc_ = pc_; |
| 1464 emit_rex_64(dst, src); |
| 1465 emit(0x0F); |
| 1466 emit(0xBF); |
| 1467 emit_operand(dst, src); |
| 1468 } |
| 1469 |
| 1470 |
1442 void Assembler::movsxlq(Register dst, Register src) { | 1471 void Assembler::movsxlq(Register dst, Register src) { |
1443 EnsureSpace ensure_space(this); | 1472 EnsureSpace ensure_space(this); |
1444 last_pc_ = pc_; | 1473 last_pc_ = pc_; |
1445 emit_rex_64(dst, src); | 1474 emit_rex_64(dst, src); |
1446 emit(0x63); | 1475 emit(0x63); |
1447 emit_modrm(dst, src); | 1476 emit_modrm(dst, src); |
1448 } | 1477 } |
1449 | 1478 |
1450 | 1479 |
1451 void Assembler::movsxlq(Register dst, const Operand& src) { | 1480 void Assembler::movsxlq(Register dst, const Operand& src) { |
(...skipping 18 matching lines...) Expand all Loading... |
1470 void Assembler::movzxbl(Register dst, const Operand& src) { | 1499 void Assembler::movzxbl(Register dst, const Operand& src) { |
1471 EnsureSpace ensure_space(this); | 1500 EnsureSpace ensure_space(this); |
1472 last_pc_ = pc_; | 1501 last_pc_ = pc_; |
1473 emit_optional_rex_32(dst, src); | 1502 emit_optional_rex_32(dst, src); |
1474 emit(0x0F); | 1503 emit(0x0F); |
1475 emit(0xB6); | 1504 emit(0xB6); |
1476 emit_operand(dst, src); | 1505 emit_operand(dst, src); |
1477 } | 1506 } |
1478 | 1507 |
1479 | 1508 |
| 1509 void Assembler::movzxwq(Register dst, const Operand& src) { |
| 1510 EnsureSpace ensure_space(this); |
| 1511 last_pc_ = pc_; |
| 1512 emit_rex_64(dst, src); |
| 1513 emit(0x0F); |
| 1514 emit(0xB7); |
| 1515 emit_operand(dst, src); |
| 1516 } |
| 1517 |
| 1518 |
1480 void Assembler::movzxwl(Register dst, const Operand& src) { | 1519 void Assembler::movzxwl(Register dst, const Operand& src) { |
1481 EnsureSpace ensure_space(this); | 1520 EnsureSpace ensure_space(this); |
1482 last_pc_ = pc_; | 1521 last_pc_ = pc_; |
1483 emit_optional_rex_32(dst, src); | 1522 emit_optional_rex_32(dst, src); |
1484 emit(0x0F); | 1523 emit(0x0F); |
1485 emit(0xB7); | 1524 emit(0xB7); |
1486 emit_operand(dst, src); | 1525 emit_operand(dst, src); |
1487 } | 1526 } |
1488 | 1527 |
1489 | 1528 |
(...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2014 emit(0xDB); | 2053 emit(0xDB); |
2015 emit_operand(2, adr); | 2054 emit_operand(2, adr); |
2016 } | 2055 } |
2017 | 2056 |
2018 | 2057 |
2019 void Assembler::fistp_d(const Operand& adr) { | 2058 void Assembler::fistp_d(const Operand& adr) { |
2020 EnsureSpace ensure_space(this); | 2059 EnsureSpace ensure_space(this); |
2021 last_pc_ = pc_; | 2060 last_pc_ = pc_; |
2022 emit_optional_rex_32(adr); | 2061 emit_optional_rex_32(adr); |
2023 emit(0xDF); | 2062 emit(0xDF); |
2024 emit_operand(8, adr); | 2063 emit_operand(7, adr); |
2025 } | 2064 } |
2026 | 2065 |
2027 | 2066 |
2028 void Assembler::fabs() { | 2067 void Assembler::fabs() { |
2029 EnsureSpace ensure_space(this); | 2068 EnsureSpace ensure_space(this); |
2030 last_pc_ = pc_; | 2069 last_pc_ = pc_; |
2031 emit(0xD9); | 2070 emit(0xD9); |
2032 emit(0xE1); | 2071 emit(0xE1); |
2033 } | 2072 } |
2034 | 2073 |
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2467 written_position_ = current_position_; | 2506 written_position_ = current_position_; |
2468 } | 2507 } |
2469 } | 2508 } |
2470 | 2509 |
2471 | 2510 |
2472 const int RelocInfo::kApplyMask = RelocInfo::kCodeTargetMask | | 2511 const int RelocInfo::kApplyMask = RelocInfo::kCodeTargetMask | |
2473 1 << RelocInfo::INTERNAL_REFERENCE | | 2512 1 << RelocInfo::INTERNAL_REFERENCE | |
2474 1 << RelocInfo::JS_RETURN; | 2513 1 << RelocInfo::JS_RETURN; |
2475 | 2514 |
2476 } } // namespace v8::internal | 2515 } } // namespace v8::internal |
OLD | NEW |