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

Side by Side Diff: test/cctest/test-disasm-ppc.cc

Issue 1381383002: PPC: Remove register index/code indirection (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 2 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/register-configuration.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 #define VERIFY_RUN() \ 92 #define VERIFY_RUN() \
93 if (failure) { \ 93 if (failure) { \
94 V8_Fatal(__FILE__, __LINE__, "PPC Disassembler tests failed.\n"); \ 94 V8_Fatal(__FILE__, __LINE__, "PPC Disassembler tests failed.\n"); \
95 } 95 }
96 96
97 TEST(DisasmPPC) { 97 TEST(DisasmPPC) {
98 SET_UP(); 98 SET_UP();
99 99
100 COMPARE(addc(r9, r7, r9), "7d274814 addc r9, r7, r9"); 100 COMPARE(addc(r9, r7, r9), "7d274814 addc r9, r7, r9");
101 COMPARE(addic(r3, r5, Operand(20)), "30650014 addic r3, r5, 20"); 101 COMPARE(addic(r3, r5, Operand(20)), "30650014 addic r3, r5, 20");
102 COMPARE(addi(r0, ip, Operand(63)), "380c003f addi r0, r12, 63"); 102 COMPARE(addi(r0, ip, Operand(63)), "380c003f addi r0, ip, 63");
103 COMPARE(add(r5, r7, r0), "7ca70214 add r5, r7, r0"); 103 COMPARE(add(r5, r7, r0), "7ca70214 add r5, r7, r0");
104 COMPARE(addze(r0, r0, LeaveOE, SetRC), "7c000195 addze. r0, r0"); 104 COMPARE(addze(r0, r0, LeaveOE, SetRC), "7c000195 addze. r0, r0");
105 COMPARE(andi(r0, r3, Operand(4)), "70600004 andi. r0, r3, 4"); 105 COMPARE(andi(r0, r3, Operand(4)), "70600004 andi. r0, r3, 4");
106 COMPARE(and_(r3, r6, r5), "7cc32838 and r3, r6, r5"); 106 COMPARE(and_(r3, r6, r5), "7cc32838 and r3, r6, r5");
107 COMPARE(and_(r6, r0, r6, SetRC), "7c063039 and. r6, r0, r6"); 107 COMPARE(and_(r6, r0, r6, SetRC), "7c063039 and. r6, r0, r6");
108 // skipping branches (for now?) 108 // skipping branches (for now?)
109 COMPARE(bctr(), "4e800420 bctr"); 109 COMPARE(bctr(), "4e800420 bctr");
110 COMPARE(bctrl(), "4e800421 bctrl"); 110 COMPARE(bctrl(), "4e800421 bctrl");
111 COMPARE(blr(), "4e800020 blr"); 111 COMPARE(blr(), "4e800020 blr");
112 // skipping call - only used in simulator 112 // skipping call - only used in simulator
(...skipping 10 matching lines...) Expand all
123 #if V8_TARGET_ARCH_PPC64 123 #if V8_TARGET_ARCH_PPC64
124 COMPARE(cmp(r5, r11), "7fa55800 cmp r5, r11"); 124 COMPARE(cmp(r5, r11), "7fa55800 cmp r5, r11");
125 #else 125 #else
126 COMPARE(cmp(r5, r11), "7f855800 cmp r5, r11"); 126 COMPARE(cmp(r5, r11), "7f855800 cmp r5, r11");
127 #endif 127 #endif
128 // skipping crxor - incomplete disassembly 128 // skipping crxor - incomplete disassembly
129 COMPARE(lbz(r4, MemOperand(r4, 7)), "88840007 lbz r4, 7(r4)"); 129 COMPARE(lbz(r4, MemOperand(r4, 7)), "88840007 lbz r4, 7(r4)");
130 COMPARE(lfd(d0, MemOperand(sp, 128)), "c8010080 lfd d0, 128(sp)"); 130 COMPARE(lfd(d0, MemOperand(sp, 128)), "c8010080 lfd d0, 128(sp)");
131 COMPARE(li(r0, Operand(16)), "38000010 li r0, 16"); 131 COMPARE(li(r0, Operand(16)), "38000010 li r0, 16");
132 COMPARE(lis(r8, Operand(22560)), "3d005820 lis r8, 22560"); 132 COMPARE(lis(r8, Operand(22560)), "3d005820 lis r8, 22560");
133 COMPARE(lwz(ip, MemOperand(r19, 44)), "8193002c lwz r12, 44(r19)"); 133 COMPARE(lwz(ip, MemOperand(r19, 44)), "8193002c lwz ip, 44(r19)");
134 COMPARE(lwzx(r0, MemOperand(r5, ip)), "7c05602e lwzx r0, r5, r12"); 134 COMPARE(lwzx(r0, MemOperand(r5, ip)), "7c05602e lwzx r0, r5, ip");
135 COMPARE(mflr(r0), "7c0802a6 mflr r0"); 135 COMPARE(mflr(r0), "7c0802a6 mflr r0");
136 COMPARE(mr(r15, r4), "7c8f2378 mr r15, r4"); 136 COMPARE(mr(r15, r4), "7c8f2378 mr r15, r4");
137 COMPARE(mtctr(r0), "7c0903a6 mtctr r0"); 137 COMPARE(mtctr(r0), "7c0903a6 mtctr r0");
138 COMPARE(mtlr(r15), "7de803a6 mtlr r15"); 138 COMPARE(mtlr(r15), "7de803a6 mtlr r15");
139 COMPARE(ori(r8, r8, Operand(42849)), "6108a761 ori r8, r8, 42849"); 139 COMPARE(ori(r8, r8, Operand(42849)), "6108a761 ori r8, r8, 42849");
140 COMPARE(orx(r5, r3, r4), "7c652378 or r5, r3, r4"); 140 COMPARE(orx(r5, r3, r4), "7c652378 or r5, r3, r4");
141 COMPARE(rlwinm(r4, r3, 2, 0, 29), "5464103a rlwinm r4, r3, 2, 0, 29"); 141 COMPARE(rlwinm(r4, r3, 2, 0, 29), "5464103a rlwinm r4, r3, 2, 0, 29");
142 COMPARE(rlwinm(r0, r3, 0, 31, 31, SetRC), 142 COMPARE(rlwinm(r0, r3, 0, 31, 31, SetRC),
143 "546007ff rlwinm. r0, r3, 0, 31, 31"); 143 "546007ff rlwinm. r0, r3, 0, 31, 31");
144 COMPARE(srawi(r3, r6, 1), "7cc30e70 srawi r3,r6,1"); 144 COMPARE(srawi(r3, r6, 1), "7cc30e70 srawi r3,r6,1");
145 COMPARE(stb(r5, MemOperand(r11, 11)), "98ab000b stb r5, 11(r11)"); 145 COMPARE(stb(r5, MemOperand(r11, 11)), "98ab000b stb r5, 11(r11)");
146 COMPARE(stfd(d2, MemOperand(sp, 8)), "d8410008 stfd d2, 8(sp)"); 146 COMPARE(stfd(d2, MemOperand(sp, 8)), "d8410008 stfd d2, 8(sp)");
147 COMPARE(stw(r16, MemOperand(sp, 64)), "92010040 stw r16, 64(sp)"); 147 COMPARE(stw(r16, MemOperand(sp, 64)), "92010040 stw r16, 64(sp)");
148 COMPARE(stwu(r3, MemOperand(sp, -4)), "9461fffc stwu r3, -4(sp)"); 148 COMPARE(stwu(r3, MemOperand(sp, -4)), "9461fffc stwu r3, -4(sp)");
149 COMPARE(sub(r3, r3, r4), "7c641850 subf r3, r4, r3"); 149 COMPARE(sub(r3, r3, r4), "7c641850 subf r3, r4, r3");
150 COMPARE(sub(r0, r9, r8, LeaveOE, SetRC), "7c084851 subf. r0, r8, r9"); 150 COMPARE(sub(r0, r9, r8, LeaveOE, SetRC), "7c084851 subf. r0, r8, r9");
151 COMPARE(xor_(r6, r5, r4), "7ca62278 xor r6, r5, r4"); 151 COMPARE(xor_(r6, r5, r4), "7ca62278 xor r6, r5, r4");
152 152
153 VERIFY_RUN(); 153 VERIFY_RUN();
154 } 154 }
OLDNEW
« no previous file with comments | « src/register-configuration.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698