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

Issue 440303004: ARM64: Support arbitrary offset in load/store pair. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 4 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/assembler-arm64.h ('k') | src/arm64/macro-assembler-arm64.h » ('j') | 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 // 2 //
3 // Redistribution and use in source and binary forms, with or without 3 // Redistribution and use in source and binary forms, with or without
4 // modification, are permitted provided that the following conditions are 4 // modification, are permitted provided that the following conditions are
5 // met: 5 // met:
6 // 6 //
7 // * Redistributions of source code must retain the above copyright 7 // * Redistributions of source code must retain the above copyright
8 // notice, this list of conditions and the following disclaimer. 8 // notice, this list of conditions and the following disclaimer.
9 // * Redistributions in binary form must reproduce the above 9 // * Redistributions in binary form must reproduce the above
10 // copyright notice, this list of conditions and the following 10 // copyright notice, this list of conditions and the following
(...skipping 2485 matching lines...) Expand 10 before | Expand all | Expand 10 after
2496 return is_int9(offset); 2496 return is_int9(offset);
2497 } 2497 }
2498 2498
2499 2499
2500 bool Assembler::IsImmLSScaled(ptrdiff_t offset, LSDataSize size) { 2500 bool Assembler::IsImmLSScaled(ptrdiff_t offset, LSDataSize size) {
2501 bool offset_is_size_multiple = (((offset >> size) << size) == offset); 2501 bool offset_is_size_multiple = (((offset >> size) << size) == offset);
2502 return offset_is_size_multiple && is_uint12(offset >> size); 2502 return offset_is_size_multiple && is_uint12(offset >> size);
2503 } 2503 }
2504 2504
2505 2505
2506 bool Assembler::IsImmLSPair(ptrdiff_t offset, LSDataSize size) {
2507 bool offset_is_size_multiple = (((offset >> size) << size) == offset);
2508 return offset_is_size_multiple && is_int7(offset >> size);
2509 }
2510
2511
2506 // Test if a given value can be encoded in the immediate field of a logical 2512 // Test if a given value can be encoded in the immediate field of a logical
2507 // instruction. 2513 // instruction.
2508 // If it can be encoded, the function returns true, and values pointed to by n, 2514 // If it can be encoded, the function returns true, and values pointed to by n,
2509 // imm_s and imm_r are updated with immediates encoded in the format required 2515 // imm_s and imm_r are updated with immediates encoded in the format required
2510 // by the corresponding fields in the logical instruction. 2516 // by the corresponding fields in the logical instruction.
2511 // If it can not be encoded, the function returns false, and the values pointed 2517 // If it can not be encoded, the function returns false, and the values pointed
2512 // to by n, imm_s and imm_r are undefined. 2518 // to by n, imm_s and imm_r are undefined.
2513 bool Assembler::IsImmLogical(uint64_t value, 2519 bool Assembler::IsImmLogical(uint64_t value,
2514 unsigned width, 2520 unsigned width,
2515 unsigned* n, 2521 unsigned* n,
(...skipping 598 matching lines...) Expand 10 before | Expand all | Expand 10 after
3114 movz(scratch, (target_offset >> 16) & 0xFFFF, 16); 3120 movz(scratch, (target_offset >> 16) & 0xFFFF, 16);
3115 movk(scratch, (target_offset >> 32) & 0xFFFF, 32); 3121 movk(scratch, (target_offset >> 32) & 0xFFFF, 32);
3116 DCHECK((target_offset >> 48) == 0); 3122 DCHECK((target_offset >> 48) == 0);
3117 add(rd, rd, scratch); 3123 add(rd, rd, scratch);
3118 } 3124 }
3119 3125
3120 3126
3121 } } // namespace v8::internal 3127 } } // namespace v8::internal
3122 3128
3123 #endif // V8_TARGET_ARCH_ARM64 3129 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « src/arm64/assembler-arm64.h ('k') | src/arm64/macro-assembler-arm64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698