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

Side by Side Diff: src/arm64/macro-assembler-arm64.cc

Issue 272183003: ARM64: Small optimisations (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/arm64/macro-assembler-arm64.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "v8.h" 5 #include "v8.h"
6 6
7 #if V8_TARGET_ARCH_ARM64 7 #if V8_TARGET_ARCH_ARM64
8 8
9 #include "bootstrapper.h" 9 #include "bootstrapper.h"
10 #include "codegen.h" 10 #include "codegen.h"
(...skipping 2325 matching lines...) Expand 10 before | Expand all | Expand 10 after
2336 } 2336 }
2337 2337
2338 2338
2339 void MacroAssembler::JumpIfMinusZero(DoubleRegister input, 2339 void MacroAssembler::JumpIfMinusZero(DoubleRegister input,
2340 Label* on_negative_zero) { 2340 Label* on_negative_zero) {
2341 TestForMinusZero(input); 2341 TestForMinusZero(input);
2342 B(vs, on_negative_zero); 2342 B(vs, on_negative_zero);
2343 } 2343 }
2344 2344
2345 2345
2346 void MacroAssembler::JumpIfMinusZero(Register input,
2347 Label* on_negative_zero) {
2348 ASSERT(input.Is64Bits());
2349 // Floating point value is in an integer register. Detect -0.0 by subtracting
2350 // 1 (cmp), which will cause overflow.
2351 Cmp(input, 1);
2352 B(vs, on_negative_zero);
2353 }
2354
2355
2346 void MacroAssembler::ClampInt32ToUint8(Register output, Register input) { 2356 void MacroAssembler::ClampInt32ToUint8(Register output, Register input) {
2347 // Clamp the value to [0..255]. 2357 // Clamp the value to [0..255].
2348 Cmp(input.W(), Operand(input.W(), UXTB)); 2358 Cmp(input.W(), Operand(input.W(), UXTB));
2349 // If input < input & 0xff, it must be < 0, so saturate to 0. 2359 // If input < input & 0xff, it must be < 0, so saturate to 0.
2350 Csel(output.W(), wzr, input.W(), lt); 2360 Csel(output.W(), wzr, input.W(), lt);
2351 // If input <= input & 0xff, it must be <= 255. Otherwise, saturate to 255. 2361 // If input <= input & 0xff, it must be <= 255. Otherwise, saturate to 255.
2352 Csel(output.W(), output.W(), 255, le); 2362 Csel(output.W(), output.W(), 255, le);
2353 } 2363 }
2354 2364
2355 2365
(...skipping 2906 matching lines...) Expand 10 before | Expand all | Expand 10 after
5262 } 5272 }
5263 } 5273 }
5264 5274
5265 5275
5266 #undef __ 5276 #undef __
5267 5277
5268 5278
5269 } } // namespace v8::internal 5279 } } // namespace v8::internal
5270 5280
5271 #endif // V8_TARGET_ARCH_ARM64 5281 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « src/arm64/macro-assembler-arm64.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698