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

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

Issue 2871663002: MIPS64: Add/fix bit insertion/extraction instrs. (Closed)
Patch Set: Remove pps variable use Created 3 years, 7 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/mips64/macro-assembler-mips64.h ('k') | src/mips64/simulator-mips64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mips64/macro-assembler-mips64.cc
diff --git a/src/mips64/macro-assembler-mips64.cc b/src/mips64/macro-assembler-mips64.cc
index 13b4be0be60065500f3ba8cea41b835e4514bbbc..01cc4e005e31e3ef6440eca48d0783b840991556 100644
--- a/src/mips64/macro-assembler-mips64.cc
+++ b/src/mips64/macro-assembler-mips64.cc
@@ -1950,55 +1950,18 @@ void MacroAssembler::Ext(Register rt,
ext_(rt, rs, pos, size);
}
-void MacroAssembler::ExtractBits(Register rt, Register rs, uint16_t pos,
- uint16_t size) {
- DCHECK(pos < 64);
- DCHECK(size > 0 && size <= 64);
- DCHECK(pos + size <= 64);
- if (pos < 32) {
- if (size <= 32) {
- Dext(rt, rs, pos, size);
- } else {
- Dextm(rt, rs, pos, size);
- }
- } else if (pos < 64) {
- DCHECK(size <= 32);
- Dextu(rt, rs, pos, size);
- }
-}
void MacroAssembler::Dext(Register rt, Register rs, uint16_t pos,
uint16_t size) {
- DCHECK(pos < 32);
- DCHECK(size > 0 && size <= 32);
- dext_(rt, rs, pos, size);
-}
-
-
-void MacroAssembler::Dextm(Register rt, Register rs, uint16_t pos,
- uint16_t size) {
- DCHECK(pos < 32);
- DCHECK(size > 32 && size <= 64);
- DCHECK((pos + size) > 32 && (pos + size) <= 64);
- dextm(rt, rs, pos, size);
-}
-
-
-void MacroAssembler::Dextu(Register rt, Register rs, uint16_t pos,
- uint16_t size) {
- DCHECK(pos >= 32 && pos < 64);
- DCHECK(size > 0 && size <= 32);
- DCHECK((pos + size) > 32 && (pos + size) <= 64);
- dextu(rt, rs, pos, size);
-}
-
-
-void MacroAssembler::Dins(Register rt, Register rs, uint16_t pos,
- uint16_t size) {
- DCHECK(pos < 32);
- DCHECK(pos + size <= 32);
- DCHECK(size != 0);
- dins_(rt, rs, pos, size);
+ DCHECK(pos < 64 && 0 < size && size <= 64 && 0 < pos + size &&
+ pos + size <= 64);
+ if (size > 32) {
+ dextm_(rt, rs, pos, size);
+ } else if (pos >= 32) {
+ dextu_(rt, rs, pos, size);
+ } else {
+ dext_(rt, rs, pos, size);
+ }
}
@@ -2012,6 +1975,19 @@ void MacroAssembler::Ins(Register rt,
ins_(rt, rs, pos, size);
}
+void MacroAssembler::Dins(Register rt, Register rs, uint16_t pos,
+ uint16_t size) {
+ DCHECK(pos < 64 && 0 < size && size <= 64 && 0 < pos + size &&
+ pos + size <= 64);
+ if (pos + size <= 32) {
+ dins_(rt, rs, pos, size);
+ } else if (pos < 32) {
+ dinsm_(rt, rs, pos, size);
+ } else {
+ dinsu_(rt, rs, pos, size);
+ }
+}
+
void MacroAssembler::Neg_s(FPURegister fd, FPURegister fs) {
if (kArchVariant == kMips64r6) {
// r6 neg_s changes the sign for NaN-like operands as well.
« no previous file with comments | « src/mips64/macro-assembler-mips64.h ('k') | src/mips64/simulator-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698