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

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

Issue 1111633002: MIPS: Fix FP load/store with large offsets from base register. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: use kIntSize. Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/mips/assembler-mips.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mips64/assembler-mips64.cc
diff --git a/src/mips64/assembler-mips64.cc b/src/mips64/assembler-mips64.cc
index 0a8c1fb4726b036eb06433dcb06dcaf61e693134..853c8ebe9ef7462e84da21a24807bb32ab6c581b 100644
--- a/src/mips64/assembler-mips64.cc
+++ b/src/mips64/assembler-mips64.cc
@@ -2205,22 +2205,42 @@ void Assembler::pref(int32_t hint, const MemOperand& rs) {
// Load, store, move.
void Assembler::lwc1(FPURegister fd, const MemOperand& src) {
- GenInstrImmediate(LWC1, src.rm(), fd, src.offset_);
+ if (is_int16(src.offset_)) {
+ GenInstrImmediate(LWC1, src.rm(), fd, src.offset_);
+ } else { // Offset > 16 bits, use multiple instructions to load.
+ LoadRegPlusOffsetToAt(src);
+ GenInstrImmediate(LWC1, at, fd, 0);
+ }
}
void Assembler::ldc1(FPURegister fd, const MemOperand& src) {
- GenInstrImmediate(LDC1, src.rm(), fd, src.offset_);
+ if (is_int16(src.offset_)) {
+ GenInstrImmediate(LDC1, src.rm(), fd, src.offset_);
+ } else { // Offset > 16 bits, use multiple instructions to load.
+ LoadRegPlusOffsetToAt(src);
+ GenInstrImmediate(LDC1, at, fd, 0);
+ }
}
void Assembler::swc1(FPURegister fd, const MemOperand& src) {
- GenInstrImmediate(SWC1, src.rm(), fd, src.offset_);
+ if (is_int16(src.offset_)) {
+ GenInstrImmediate(SWC1, src.rm(), fd, src.offset_);
+ } else { // Offset > 16 bits, use multiple instructions to load.
+ LoadRegPlusOffsetToAt(src);
+ GenInstrImmediate(SWC1, at, fd, 0);
+ }
}
void Assembler::sdc1(FPURegister fd, const MemOperand& src) {
- GenInstrImmediate(SDC1, src.rm(), fd, src.offset_);
+ if (is_int16(src.offset_)) {
+ GenInstrImmediate(SDC1, src.rm(), fd, src.offset_);
+ } else { // Offset > 16 bits, use multiple instructions to load.
+ LoadRegPlusOffsetToAt(src);
+ GenInstrImmediate(SDC1, at, fd, 0);
+ }
}
« no previous file with comments | « src/mips/assembler-mips.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698