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/compiler/mips/code-generator-mips.cc

Issue 1779713009: Implement optional turbofan UnalignedLoad and UnalignedStore operators (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Unaligned access simulate using load/shift/or and store/shift/and Created 4 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
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 #include "src/ast/scopes.h" 5 #include "src/ast/scopes.h"
6 #include "src/compiler/code-generator.h" 6 #include "src/compiler/code-generator.h"
7 #include "src/compiler/code-generator-impl.h" 7 #include "src/compiler/code-generator-impl.h"
8 #include "src/compiler/gap-resolver.h" 8 #include "src/compiler/gap-resolver.h"
9 #include "src/compiler/node-matchers.h" 9 #include "src/compiler/node-matchers.h"
10 #include "src/compiler/osr.h" 10 #include "src/compiler/osr.h"
(...skipping 1207 matching lines...) Expand 10 before | Expand all | Expand 10 after
1218 break; 1218 break;
1219 case kMipsLb: 1219 case kMipsLb:
1220 __ lb(i.OutputRegister(), i.MemoryOperand()); 1220 __ lb(i.OutputRegister(), i.MemoryOperand());
1221 break; 1221 break;
1222 case kMipsSb: 1222 case kMipsSb:
1223 __ sb(i.InputRegister(2), i.MemoryOperand()); 1223 __ sb(i.InputRegister(2), i.MemoryOperand());
1224 break; 1224 break;
1225 case kMipsLhu: 1225 case kMipsLhu:
1226 __ lhu(i.OutputRegister(), i.MemoryOperand()); 1226 __ lhu(i.OutputRegister(), i.MemoryOperand());
1227 break; 1227 break;
1228 case kMipsUlhu:
1229 __ Ulhu(i.OutputRegister(), i.MemoryOperand());
1230 break;
1228 case kMipsLh: 1231 case kMipsLh:
1229 __ lh(i.OutputRegister(), i.MemoryOperand()); 1232 __ lh(i.OutputRegister(), i.MemoryOperand());
1230 break; 1233 break;
1234 case kMipsUlh:
1235 __ Ulh(i.OutputRegister(), i.MemoryOperand());
1236 break;
1231 case kMipsSh: 1237 case kMipsSh:
1232 __ sh(i.InputRegister(2), i.MemoryOperand()); 1238 __ sh(i.InputRegister(2), i.MemoryOperand());
1233 break; 1239 break;
1240 case kMipsUsh:
1241 __ Ush(i.InputRegister(2), i.MemoryOperand(), kScratchReg);
1242 break;
1234 case kMipsLw: 1243 case kMipsLw:
1235 __ lw(i.OutputRegister(), i.MemoryOperand()); 1244 __ lw(i.OutputRegister(), i.MemoryOperand());
1236 break; 1245 break;
1246 case kMipsUlw:
1247 __ Ulw(i.OutputRegister(), i.MemoryOperand());
1248 break;
1237 case kMipsSw: 1249 case kMipsSw:
1238 __ sw(i.InputRegister(2), i.MemoryOperand()); 1250 __ sw(i.InputRegister(2), i.MemoryOperand());
1239 break; 1251 break;
1252 case kMipsUsw:
1253 __ Usw(i.InputRegister(2), i.MemoryOperand());
1254 break;
1240 case kMipsLwc1: { 1255 case kMipsLwc1: {
1241 __ lwc1(i.OutputSingleRegister(), i.MemoryOperand()); 1256 __ lwc1(i.OutputSingleRegister(), i.MemoryOperand());
1242 break; 1257 break;
1243 } 1258 }
1259 case kMipsUlwc1: {
1260 __ lwc1(i.OutputSingleRegister(), i.MemoryOperand());
1261 break;
1262 }
1244 case kMipsSwc1: { 1263 case kMipsSwc1: {
1245 size_t index = 0; 1264 size_t index = 0;
1246 MemOperand operand = i.MemoryOperand(&index); 1265 MemOperand operand = i.MemoryOperand(&index);
1247 __ swc1(i.InputSingleRegister(index), operand); 1266 __ swc1(i.InputSingleRegister(index), operand);
1248 break; 1267 break;
1249 } 1268 }
1269 case kMipsUswc1: {
1270 size_t index = 0;
1271 MemOperand operand = i.MemoryOperand(&index);
1272 __ Uswc1(i.InputSingleRegister(index), operand, kScratchReg);
1273 break;
1274 }
1250 case kMipsLdc1: 1275 case kMipsLdc1:
1251 __ ldc1(i.OutputDoubleRegister(), i.MemoryOperand()); 1276 __ ldc1(i.OutputDoubleRegister(), i.MemoryOperand());
1252 break; 1277 break;
1278 case kMipsUldc1:
1279 __ Uldc1(i.OutputDoubleRegister(), i.MemoryOperand(), kScratchReg);
1280 break;
1253 case kMipsSdc1: 1281 case kMipsSdc1:
1254 __ sdc1(i.InputDoubleRegister(2), i.MemoryOperand()); 1282 __ sdc1(i.InputDoubleRegister(2), i.MemoryOperand());
1255 break; 1283 break;
1284 case kMipsUsdc1:
1285 __ Usdc1(i.InputDoubleRegister(2), i.MemoryOperand(), kScratchReg);
1286 break;
1256 case kMipsPush: 1287 case kMipsPush:
1257 if (instr->InputAt(0)->IsDoubleRegister()) { 1288 if (instr->InputAt(0)->IsDoubleRegister()) {
1258 __ sdc1(i.InputDoubleRegister(0), MemOperand(sp, -kDoubleSize)); 1289 __ sdc1(i.InputDoubleRegister(0), MemOperand(sp, -kDoubleSize));
1259 __ Subu(sp, sp, Operand(kDoubleSize)); 1290 __ Subu(sp, sp, Operand(kDoubleSize));
1260 frame_access_state()->IncreaseSPDelta(kDoubleSize / kPointerSize); 1291 frame_access_state()->IncreaseSPDelta(kDoubleSize / kPointerSize);
1261 } else { 1292 } else {
1262 __ Push(i.InputRegister(0)); 1293 __ Push(i.InputRegister(0));
1263 frame_access_state()->IncreaseSPDelta(1); 1294 frame_access_state()->IncreaseSPDelta(1);
1264 } 1295 }
1265 break; 1296 break;
(...skipping 653 matching lines...) Expand 10 before | Expand all | Expand 10 after
1919 padding_size -= v8::internal::Assembler::kInstrSize; 1950 padding_size -= v8::internal::Assembler::kInstrSize;
1920 } 1951 }
1921 } 1952 }
1922 } 1953 }
1923 1954
1924 #undef __ 1955 #undef __
1925 1956
1926 } // namespace compiler 1957 } // namespace compiler
1927 } // namespace internal 1958 } // namespace internal
1928 } // namespace v8 1959 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698