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

Unified Diff: src/mips/assembler-mips.cc

Issue 35463002: MIPS: Enable aligned keyed stores and loads for double arrays. Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/mips/assembler-mips.h ('k') | src/mips/lithium-codegen-mips.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mips/assembler-mips.cc
diff --git a/src/mips/assembler-mips.cc b/src/mips/assembler-mips.cc
index 0972a8295cbe40ab049649d9035c783f3cf42e8d..362bf9eca0186284dbf8a187671fca1d3c4a3e2a 100644
--- a/src/mips/assembler-mips.cc
+++ b/src/mips/assembler-mips.cc
@@ -1630,13 +1630,17 @@ void Assembler::lwc1(FPURegister fd, const MemOperand& src) {
}
-void Assembler::ldc1(FPURegister fd, const MemOperand& src) {
+void Assembler::ldc1(FPURegister fd, const MemOperand& src, bool aligned) {
// Workaround for non-8-byte alignment of HeapNumber, convert 64-bit
// load to two 32-bit loads.
- GenInstrImmediate(LWC1, src.rm(), fd, src.offset_);
- FPURegister nextfpreg;
- nextfpreg.setcode(fd.code() + 1);
- GenInstrImmediate(LWC1, src.rm(), nextfpreg, src.offset_ + 4);
+ if (aligned) {
+ GenInstrImmediate(LDC1, src.rm(), fd, src.offset_);
+ } else {
+ GenInstrImmediate(LWC1, src.rm(), fd, src.offset_);
+ FPURegister nextfpreg;
+ nextfpreg.setcode(fd.code() + 1);
+ GenInstrImmediate(LWC1, src.rm(), nextfpreg, src.offset_ + 4);
+ }
}
@@ -1645,13 +1649,17 @@ void Assembler::swc1(FPURegister fd, const MemOperand& src) {
}
-void Assembler::sdc1(FPURegister fd, const MemOperand& src) {
+void Assembler::sdc1(FPURegister fd, const MemOperand& src, bool aligned) {
// Workaround for non-8-byte alignment of HeapNumber, convert 64-bit
// store to two 32-bit stores.
- GenInstrImmediate(SWC1, src.rm(), fd, src.offset_);
- FPURegister nextfpreg;
- nextfpreg.setcode(fd.code() + 1);
- GenInstrImmediate(SWC1, src.rm(), nextfpreg, src.offset_ + 4);
+ if (aligned) {
+ GenInstrImmediate(SDC1, src.rm(), fd, src.offset_);
+ } else {
+ GenInstrImmediate(SWC1, src.rm(), fd, src.offset_);
+ FPURegister nextfpreg;
+ nextfpreg.setcode(fd.code() + 1);
+ GenInstrImmediate(SWC1, src.rm(), nextfpreg, src.offset_ + 4);
+ }
}
« no previous file with comments | « src/mips/assembler-mips.h ('k') | src/mips/lithium-codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698