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

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

Issue 2892163002: MIPS64: Add optimizations to li macro. (Closed)
Patch Set: Add Subu optimization 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
Index: src/mips64/macro-assembler-mips64.h
diff --git a/src/mips64/macro-assembler-mips64.h b/src/mips64/macro-assembler-mips64.h
index ef13a2f57f8cd766f4d8a06d7ab07d058cd81196..35608de6309be637e1c5a05123d8fa17b8ba736d 100644
--- a/src/mips64/macro-assembler-mips64.h
+++ b/src/mips64/macro-assembler-mips64.h
@@ -80,17 +80,17 @@ enum LiFlags {
// optimize the li to use a single instruction, rather than lui/ori/dsll
// sequence.
OPTIMIZE_SIZE = 0,
- // Always use 6 instructions (lui/ori/dsll sequence), even if the constant
+ // Always use 6 instructions (lui/ori/dsll sequence) for release 2 or 4
+ // instructions for release 6 (lui/ori/dahi/dati), even if the constant
// could be loaded with just one, so that this value is patchable later.
CONSTANT_SIZE = 1,
// For address loads only 4 instruction are required. Used to mark
// constant load that will be used as address without relocation
// information. It ensures predictable code size, so specific sites
// in code are patchable.
- ADDRESS_LOAD = 2
+ ADDRESS_LOAD = 2
};
-
enum RememberedSetAction { EMIT_REMEMBERED_SET, OMIT_REMEMBERED_SET };
enum SmiCheck { INLINE_SMI_CHECK, OMIT_SMI_CHECK };
enum PointersToHereCheck {
@@ -739,7 +739,7 @@ class MacroAssembler: public Assembler {
// Load int32 in the rd register.
void li(Register rd, Operand j, LiFlags mode = OPTIMIZE_SIZE);
- inline bool LiLower32BitHelper(Register rd, Operand j);
+ inline void LiLower32BitHelper(Register rd, Operand j);
inline void li(Register rd, int64_t j, LiFlags mode = OPTIMIZE_SIZE) {
li(rd, Operand(j), mode);
}

Powered by Google App Engine
This is Rietveld 408576698