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

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

Issue 704543002: ARM: optimize inlined doubles (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 1 month 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arm/assembler-arm.cc
diff --git a/src/arm/assembler-arm.cc b/src/arm/assembler-arm.cc
index 17bf4f93ac7b7a5cf054f7afeadf06b8af3ee245..eae38be6ebb6a2be61f7e35a2be6fc46a91a4071 100644
--- a/src/arm/assembler-arm.cc
+++ b/src/arm/assembler-arm.cc
@@ -2545,27 +2545,20 @@ void Assembler::vmov(const DwVfpRegister dst,
uint32_t lo, hi;
DoubleAsTwoUInt32(imm, &lo, &hi);
- if (scratch.is(no_reg)) {
- if (dst.code() < 16) {
- const LowDwVfpRegister loc = LowDwVfpRegister::from_code(dst.code());
- // Move the low part of the double into the lower of the corresponsing S
- // registers of D register dst.
- mov(ip, Operand(lo));
- vmov(loc.low(), ip);
-
- // Move the high part of the double into the higher of the
- // corresponsing S registers of D register dst.
- mov(ip, Operand(hi));
- vmov(loc.high(), ip);
+ if (lo == hi) {
+ // Move the low and high parts of the double to a D register in one
+ // instruction.
+ mov(ip, Operand(lo));
+ vmov(dst, ip, ip);
+ } else if (scratch.is(no_reg)) {
+ mov(ip, Operand(lo));
+ vmov(dst, VmovIndexLo, ip);
+ if ((lo & 0xffff) == (hi & 0xffff)) {
+ movt(ip, hi >> 16);
} else {
- // D16-D31 does not have S registers, so move the low and high parts
- // directly to the D register using vmov.32.
- // Note: This may be slower, so we only do this when we have to.
- mov(ip, Operand(lo));
- vmov(dst, VmovIndexLo, ip);
mov(ip, Operand(hi));
- vmov(dst, VmovIndexHi, ip);
}
+ vmov(dst, VmovIndexHi, ip);
} else {
// Move the low and high parts of the double to a D register in one
// instruction.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698