Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Side by Side Diff: src/ppc/disasm-ppc.cc

Issue 2754263004: PPC: [Atomics] Make Atomics.exchange a builtin using TF (Closed)
Patch Set: rebased Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/ppc/constants-ppc.h ('k') | src/ppc/simulator-ppc.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // A Disassembler object is used to disassemble a block of code instruction by 5 // A Disassembler object is used to disassemble a block of code instruction by
6 // instruction. The default implementation of the NameConverter object can be 6 // instruction. The default implementation of the NameConverter object can be
7 // overriden to modify register names or to do symbol lookup on addresses. 7 // overriden to modify register names or to do symbol lookup on addresses.
8 // 8 //
9 // The example below will disassemble a block of code and print it to stdout. 9 // The example below will disassemble a block of code and print it to stdout.
10 // 10 //
(...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after
555 case SRAW: { 555 case SRAW: {
556 Format(instr, "sraw'. 'ra, 'rs, 'rb"); 556 Format(instr, "sraw'. 'ra, 'rs, 'rb");
557 return; 557 return;
558 } 558 }
559 #if V8_TARGET_ARCH_PPC64 559 #if V8_TARGET_ARCH_PPC64
560 case SRAD: { 560 case SRAD: {
561 Format(instr, "srad'. 'ra, 'rs, 'rb"); 561 Format(instr, "srad'. 'ra, 'rs, 'rb");
562 return; 562 return;
563 } 563 }
564 #endif 564 #endif
565 case SYNC: {
566 Format(instr, "sync");
567 return;
568 }
565 case MODSW: { 569 case MODSW: {
566 Format(instr, "modsw 'rt, 'ra, 'rb"); 570 Format(instr, "modsw 'rt, 'ra, 'rb");
567 return; 571 return;
568 } 572 }
569 case MODUW: { 573 case MODUW: {
570 Format(instr, "moduw 'rt, 'ra, 'rb"); 574 Format(instr, "moduw 'rt, 'ra, 'rb");
571 return; 575 return;
572 } 576 }
573 #if V8_TARGET_ARCH_PPC64 577 #if V8_TARGET_ARCH_PPC64
574 case MODSD: { 578 case MODSD: {
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
642 #endif 646 #endif
643 } 647 }
644 648
645 switch (EXT2 | (instr->BitField(10, 2))) { 649 switch (EXT2 | (instr->BitField(10, 2))) {
646 case SRADIX: { 650 case SRADIX: {
647 Format(instr, "sradi'. 'ra,'rs,'sh"); 651 Format(instr, "sradi'. 'ra,'rs,'sh");
648 return; 652 return;
649 } 653 }
650 } 654 }
651 655
656 switch (EXT2 | (instr->BitField(10, 0))) {
657 case STBCX: {
658 Format(instr, "stbcx 'rs, 'ra, 'rb");
659 return;
660 }
661 case STHCX: {
662 Format(instr, "sthcx 'rs, 'ra, 'rb");
663 return;
664 }
665 case STWCX: {
666 Format(instr, "stwcx 'rs, 'ra, 'rb");
667 return;
668 }
669 }
670
652 // ?? are all of these xo_form? 671 // ?? are all of these xo_form?
653 switch (EXT2 | (instr->BitField(9, 1))) { 672 switch (EXT2 | (instr->BitField(9, 1))) {
654 case CMP: { 673 case CMP: {
655 #if V8_TARGET_ARCH_PPC64 674 #if V8_TARGET_ARCH_PPC64
656 if (instr->Bit(21)) { 675 if (instr->Bit(21)) {
657 #endif 676 #endif
658 Format(instr, "cmp 'ra, 'rb"); 677 Format(instr, "cmp 'ra, 'rb");
659 #if V8_TARGET_ARCH_PPC64 678 #if V8_TARGET_ARCH_PPC64
660 } else { 679 } else {
661 Format(instr, "cmpw 'ra, 'rb"); 680 Format(instr, "cmpw 'ra, 'rb");
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
852 return; 871 return;
853 } 872 }
854 case LHZUX: { 873 case LHZUX: {
855 Format(instr, "lhzux 'rt, 'ra, 'rb"); 874 Format(instr, "lhzux 'rt, 'ra, 'rb");
856 return; 875 return;
857 } 876 }
858 case LHAX: { 877 case LHAX: {
859 Format(instr, "lhax 'rt, 'ra, 'rb"); 878 Format(instr, "lhax 'rt, 'ra, 'rb");
860 return; 879 return;
861 } 880 }
881 case LBARX: {
882 Format(instr, "lbarx 'rt, 'ra, 'rb");
883 return;
884 }
885 case LHARX: {
886 Format(instr, "lharx 'rt, 'ra, 'rb");
887 return;
888 }
889 case LWARX: {
890 Format(instr, "lwarx 'rt, 'ra, 'rb");
891 return;
892 }
862 #if V8_TARGET_ARCH_PPC64 893 #if V8_TARGET_ARCH_PPC64
863 case LDX: { 894 case LDX: {
864 Format(instr, "ldx 'rt, 'ra, 'rb"); 895 Format(instr, "ldx 'rt, 'ra, 'rb");
865 return; 896 return;
866 } 897 }
867 case LDUX: { 898 case LDUX: {
868 Format(instr, "ldux 'rt, 'ra, 'rb"); 899 Format(instr, "ldux 'rt, 'ra, 'rb");
869 return; 900 return;
870 } 901 }
871 case STDX: { 902 case STDX: {
(...skipping 638 matching lines...) Expand 10 before | Expand all | Expand 10 after
1510 pc += d.InstructionDecode(buffer, pc); 1541 pc += d.InstructionDecode(buffer, pc);
1511 v8::internal::PrintF(f, "%p %08x %s\n", static_cast<void*>(prev_pc), 1542 v8::internal::PrintF(f, "%p %08x %s\n", static_cast<void*>(prev_pc),
1512 *reinterpret_cast<int32_t*>(prev_pc), buffer.start()); 1543 *reinterpret_cast<int32_t*>(prev_pc), buffer.start());
1513 } 1544 }
1514 } 1545 }
1515 1546
1516 1547
1517 } // namespace disasm 1548 } // namespace disasm
1518 1549
1519 #endif // V8_TARGET_ARCH_PPC 1550 #endif // V8_TARGET_ARCH_PPC
OLDNEW
« no previous file with comments | « src/ppc/constants-ppc.h ('k') | src/ppc/simulator-ppc.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698