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: src/s390/assembler-s390.cc

Issue 2691893002: s390: use new mul instruction (Closed)
Patch Set: fix comment Created 3 years, 10 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/s390/assembler-s390.h ('k') | src/s390/constants-s390.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 (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 5 // modification, are permitted provided that the following conditions
6 // are met: 6 // are 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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 supported_ |= (1u << GENERAL_INSTR_EXT); 159 supported_ |= (1u << GENERAL_INSTR_EXT);
160 } 160 }
161 // Test for Floating Point Extension Facility - Bit 37 161 // Test for Floating Point Extension Facility - Bit 37
162 if (facilities[0] & (one << (63 - 37))) { 162 if (facilities[0] & (one << (63 - 37))) {
163 supported_ |= (1u << FLOATING_POINT_EXT); 163 supported_ |= (1u << FLOATING_POINT_EXT);
164 } 164 }
165 // Test for Vector Facility - Bit 129 165 // Test for Vector Facility - Bit 129
166 if (facilities[2] & (one << (63 - (129 - 128)))) { 166 if (facilities[2] & (one << (63 - (129 - 128)))) {
167 supported_ |= (1u << VECTOR_FACILITY); 167 supported_ |= (1u << VECTOR_FACILITY);
168 } 168 }
169 // Test for Miscellaneous Instruction Extension Facility - Bit 58
170 if (facilities[0] & (1lu << (63 - 58))) {
171 supported_ |= (1u << MISC_INSTR_EXT2);
172 }
169 } 173 }
170 #else 174 #else
171 // All distinct ops instructions can be simulated 175 // All distinct ops instructions can be simulated
172 supported_ |= (1u << DISTINCT_OPS); 176 supported_ |= (1u << DISTINCT_OPS);
173 // RISBG can be simulated 177 // RISBG can be simulated
174 supported_ |= (1u << GENERAL_INSTR_EXT); 178 supported_ |= (1u << GENERAL_INSTR_EXT);
175
176 supported_ |= (1u << FLOATING_POINT_EXT); 179 supported_ |= (1u << FLOATING_POINT_EXT);
180 supported_ |= (1u << MISC_INSTR_EXT2);
177 USE(performSTFLE); // To avoid assert 181 USE(performSTFLE); // To avoid assert
178 supported_ |= (1u << VECTOR_FACILITY); 182 supported_ |= (1u << VECTOR_FACILITY);
179 #endif 183 #endif
180 supported_ |= (1u << FPU); 184 supported_ |= (1u << FPU);
181 } 185 }
182 186
183 void CpuFeatures::PrintTarget() { 187 void CpuFeatures::PrintTarget() {
184 const char* s390_arch = NULL; 188 const char* s390_arch = NULL;
185 189
186 #if V8_TARGET_ARCH_S390X 190 #if V8_TARGET_ARCH_S390X
187 s390_arch = "s390x"; 191 s390_arch = "s390x";
188 #else 192 #else
189 s390_arch = "s390"; 193 s390_arch = "s390";
190 #endif 194 #endif
191 195
192 printf("target %s\n", s390_arch); 196 printf("target %s\n", s390_arch);
193 } 197 }
194 198
195 void CpuFeatures::PrintFeatures() { 199 void CpuFeatures::PrintFeatures() {
196 printf("FPU=%d\n", CpuFeatures::IsSupported(FPU)); 200 printf("FPU=%d\n", CpuFeatures::IsSupported(FPU));
197 printf("FPU_EXT=%d\n", CpuFeatures::IsSupported(FLOATING_POINT_EXT)); 201 printf("FPU_EXT=%d\n", CpuFeatures::IsSupported(FLOATING_POINT_EXT));
198 printf("GENERAL_INSTR=%d\n", CpuFeatures::IsSupported(GENERAL_INSTR_EXT)); 202 printf("GENERAL_INSTR=%d\n", CpuFeatures::IsSupported(GENERAL_INSTR_EXT));
199 printf("DISTINCT_OPS=%d\n", CpuFeatures::IsSupported(DISTINCT_OPS)); 203 printf("DISTINCT_OPS=%d\n", CpuFeatures::IsSupported(DISTINCT_OPS));
200 printf("VECTOR_FACILITY=%d\n", CpuFeatures::IsSupported(VECTOR_FACILITY)); 204 printf("VECTOR_FACILITY=%d\n", CpuFeatures::IsSupported(VECTOR_FACILITY));
205 printf("MISC_INSTR_EXT2=%d\n", CpuFeatures::IsSupported(MISC_INSTR_EXT2));
201 } 206 }
202 207
203 Register ToRegister(int num) { 208 Register ToRegister(int num) {
204 DCHECK(num >= 0 && num < kNumRegisters); 209 DCHECK(num >= 0 && num < kNumRegisters);
205 const Register kRegisters[] = {r0, r1, r2, r3, r4, r5, r6, r7, 210 const Register kRegisters[] = {r0, r1, r2, r3, r4, r5, r6, r7,
206 r8, r9, r10, fp, ip, r13, r14, sp}; 211 r8, r9, r10, fp, ip, r13, r14, sp};
207 return kRegisters[num]; 212 return kRegisters[num];
208 } 213 }
209 214
210 // ----------------------------------------------------------------------------- 215 // -----------------------------------------------------------------------------
(...skipping 1292 matching lines...) Expand 10 before | Expand all | Expand 10 after
1503 } 1508 }
1504 1509
1505 // ---------------------------- 1510 // ----------------------------
1506 // 32-bit Multiply Instructions 1511 // 32-bit Multiply Instructions
1507 // ---------------------------- 1512 // ----------------------------
1508 // Multiply Halfword Immediate (32) 1513 // Multiply Halfword Immediate (32)
1509 void Assembler::mhi(Register r1, const Operand& opnd) { 1514 void Assembler::mhi(Register r1, const Operand& opnd) {
1510 ri_form(MHI, r1, opnd); 1515 ri_form(MHI, r1, opnd);
1511 } 1516 }
1512 1517
1518 // Multiply Single Register (32)
1519 void Assembler::msrkc(Register r1, Register r2, Register r3) {
1520 rrf1_form(MSRKC, r1, r2, r3);
1521 }
1522
1523 // Multiply Single Register (64)
1524 void Assembler::msgrkc(Register r1, Register r2, Register r3) {
1525 rrf1_form(MSGRKC, r1, r2, r3);
1526 }
1527
1513 // ---------------------------- 1528 // ----------------------------
1514 // 64-bit Multiply Instructions 1529 // 64-bit Multiply Instructions
1515 // ---------------------------- 1530 // ----------------------------
1516 // Multiply Halfword Immediate (64) 1531 // Multiply Halfword Immediate (64)
1517 void Assembler::mghi(Register r1, const Operand& opnd) { 1532 void Assembler::mghi(Register r1, const Operand& opnd) {
1518 ri_form(MGHI, r1, opnd); 1533 ri_form(MGHI, r1, opnd);
1519 } 1534 }
1520 1535
1521 // -------------------- 1536 // --------------------
1522 // Bitwise Instructions 1537 // Bitwise Instructions
(...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after
2098 SKIP_ICACHE_FLUSH); 2113 SKIP_ICACHE_FLUSH);
2099 } 2114 }
2100 2115
2101 reloc_info_writer.Write(&rinfo); 2116 reloc_info_writer.Write(&rinfo);
2102 } 2117 }
2103 } 2118 }
2104 2119
2105 } // namespace internal 2120 } // namespace internal
2106 } // namespace v8 2121 } // namespace v8
2107 #endif // V8_TARGET_ARCH_S390 2122 #endif // V8_TARGET_ARCH_S390
OLDNEW
« no previous file with comments | « src/s390/assembler-s390.h ('k') | src/s390/constants-s390.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698