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/mips/assembler-mips.cc

Issue 1323763002: MIPS: Fixing illegal use of at register (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 3 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 (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 are 5 // modification, are permitted provided that the following conditions are
6 // met: 6 // 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 2006 matching lines...) Expand 10 before | Expand all | Expand 10 after
2017 } else { // Offset > 16 bits, use multiple instructions to load. 2017 } else { // Offset > 16 bits, use multiple instructions to load.
2018 LoadRegPlusOffsetToAt(src); 2018 LoadRegPlusOffsetToAt(src);
2019 GenInstrImmediate(LWC1, at, fd, 0); 2019 GenInstrImmediate(LWC1, at, fd, 0);
2020 } 2020 }
2021 } 2021 }
2022 2022
2023 2023
2024 void Assembler::ldc1(FPURegister fd, const MemOperand& src) { 2024 void Assembler::ldc1(FPURegister fd, const MemOperand& src) {
2025 // Workaround for non-8-byte alignment of HeapNumber, convert 64-bit 2025 // Workaround for non-8-byte alignment of HeapNumber, convert 64-bit
2026 // load to two 32-bit loads. 2026 // load to two 32-bit loads.
2027 CHECK(!src.rm().is(at));
paul.l... 2015/08/31 22:56:34 I think these should be DCHECK (here and below).
Djordje.Pesic 2015/09/07 11:34:17 Done.
2027 if (IsFp64Mode()) { 2028 if (IsFp64Mode()) {
2028 if (is_int16(src.offset_) && is_int16(src.offset_ + kIntSize)) { 2029 if (is_int16(src.offset_) && is_int16(src.offset_ + kIntSize)) {
2029 GenInstrImmediate(LWC1, src.rm(), fd, 2030 GenInstrImmediate(LWC1, src.rm(), fd,
2030 src.offset_ + Register::kMantissaOffset); 2031 src.offset_ + Register::kMantissaOffset);
2031 GenInstrImmediate(LW, src.rm(), at, 2032 GenInstrImmediate(LW, src.rm(), at,
2032 src.offset_ + Register::kExponentOffset); 2033 src.offset_ + Register::kExponentOffset);
2033 mthc1(at, fd); 2034 mthc1(at, fd);
2034 } else { // Offset > 16 bits, use multiple instructions to load. 2035 } else { // Offset > 16 bits, use multiple instructions to load.
2035 LoadRegPlusOffsetToAt(src); 2036 LoadRegPlusOffsetToAt(src);
2036 GenInstrImmediate(LWC1, at, fd, Register::kMantissaOffset); 2037 GenInstrImmediate(LWC1, at, fd, Register::kMantissaOffset);
(...skipping 25 matching lines...) Expand all
2062 } else { // Offset > 16 bits, use multiple instructions to load. 2063 } else { // Offset > 16 bits, use multiple instructions to load.
2063 LoadRegPlusOffsetToAt(src); 2064 LoadRegPlusOffsetToAt(src);
2064 GenInstrImmediate(SWC1, at, fd, 0); 2065 GenInstrImmediate(SWC1, at, fd, 0);
2065 } 2066 }
2066 } 2067 }
2067 2068
2068 2069
2069 void Assembler::sdc1(FPURegister fd, const MemOperand& src) { 2070 void Assembler::sdc1(FPURegister fd, const MemOperand& src) {
2070 // Workaround for non-8-byte alignment of HeapNumber, convert 64-bit 2071 // Workaround for non-8-byte alignment of HeapNumber, convert 64-bit
2071 // store to two 32-bit stores. 2072 // store to two 32-bit stores.
2073 CHECK(!src.rm().is(at));
2072 if (IsFp64Mode()) { 2074 if (IsFp64Mode()) {
2073 if (is_int16(src.offset_) && is_int16(src.offset_ + kIntSize)) { 2075 if (is_int16(src.offset_) && is_int16(src.offset_ + kIntSize)) {
2074 GenInstrImmediate(SWC1, src.rm(), fd, 2076 GenInstrImmediate(SWC1, src.rm(), fd,
2075 src.offset_ + Register::kMantissaOffset); 2077 src.offset_ + Register::kMantissaOffset);
2076 mfhc1(at, fd); 2078 mfhc1(at, fd);
2077 GenInstrImmediate(SW, src.rm(), at, 2079 GenInstrImmediate(SW, src.rm(), at,
2078 src.offset_ + Register::kExponentOffset); 2080 src.offset_ + Register::kExponentOffset);
2079 } else { // Offset > 16 bits, use multiple instructions to load. 2081 } else { // Offset > 16 bits, use multiple instructions to load.
2080 LoadRegPlusOffsetToAt(src); 2082 LoadRegPlusOffsetToAt(src);
2081 GenInstrImmediate(SWC1, at, fd, Register::kMantissaOffset); 2083 GenInstrImmediate(SWC1, at, fd, Register::kMantissaOffset);
2082 mfhc1(t8, fd); 2084 mfhc1(t8, fd);
paul.l... 2015/08/31 22:56:34 Note the use of t8 here. (t8 is reserved for macro
Djordje.Pesic 2015/09/07 11:34:17 Done.
2083 GenInstrImmediate(SW, at, t8, Register::kExponentOffset); 2085 GenInstrImmediate(SW, at, t8, Register::kExponentOffset);
2084 } 2086 }
2085 } else { // fp32 mode. 2087 } else { // fp32 mode.
2086 if (is_int16(src.offset_) && is_int16(src.offset_ + kIntSize)) { 2088 if (is_int16(src.offset_) && is_int16(src.offset_ + kIntSize)) {
2087 GenInstrImmediate(SWC1, src.rm(), fd, 2089 GenInstrImmediate(SWC1, src.rm(), fd,
2088 src.offset_ + Register::kMantissaOffset); 2090 src.offset_ + Register::kMantissaOffset);
2089 FPURegister nextfpreg; 2091 FPURegister nextfpreg;
2090 nextfpreg.setcode(fd.code() + 1); 2092 nextfpreg.setcode(fd.code() + 1);
2091 GenInstrImmediate(SWC1, src.rm(), nextfpreg, 2093 GenInstrImmediate(SWC1, src.rm(), nextfpreg,
2092 src.offset_ + Register::kExponentOffset); 2094 src.offset_ + Register::kExponentOffset);
(...skipping 998 matching lines...) Expand 10 before | Expand all | Expand 10 after
3091 if (patched) { 3093 if (patched) {
3092 CpuFeatures::FlushICache(pc + 2, sizeof(Address)); 3094 CpuFeatures::FlushICache(pc + 2, sizeof(Address));
3093 } 3095 }
3094 } 3096 }
3095 3097
3096 3098
3097 } // namespace internal 3099 } // namespace internal
3098 } // namespace v8 3100 } // namespace v8
3099 3101
3100 #endif // V8_TARGET_ARCH_MIPS 3102 #endif // V8_TARGET_ARCH_MIPS
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698