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

Issue 1698483002: [arm][arm64] Improve CountTrailingZero implementation. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: comments addressed Created 4 years, 10 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
« no previous file with comments | « src/arm/assembler-arm.h ('k') | src/arm/disasm-arm.cc » ('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 (c) 1994-2006 Sun Microsystems Inc. 1 // Copyright (c) 1994-2006 Sun Microsystems Inc.
2 // All Rights Reserved. 2 // All Rights Reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions 5 // modification, are permitted provided that the following conditions
6 // are met: 6 // are met:
7 // 7 //
8 // - Redistributions of source code must retain the above copyright notice, 8 // - Redistributions of source code must retain the above copyright notice,
9 // this list of conditions and the following disclaimer. 9 // this list of conditions and the following disclaimer.
10 // 10 //
(...skipping 1929 matching lines...) Expand 10 before | Expand all | Expand 10 after
1940 // Rd(15-12) | rotate(11-10) | 00(9-8)| 0111(7-4) | Rm(3-0) 1940 // Rd(15-12) | rotate(11-10) | 00(9-8)| 0111(7-4) | Rm(3-0)
1941 DCHECK(!dst.is(pc)); 1941 DCHECK(!dst.is(pc));
1942 DCHECK(!src1.is(pc)); 1942 DCHECK(!src1.is(pc));
1943 DCHECK(!src2.is(pc)); 1943 DCHECK(!src2.is(pc));
1944 DCHECK(rotate == 0 || rotate == 8 || rotate == 16 || rotate == 24); 1944 DCHECK(rotate == 0 || rotate == 8 || rotate == 16 || rotate == 24);
1945 emit(cond | 0x6F * B20 | src1.code() * B16 | dst.code() * B12 | 1945 emit(cond | 0x6F * B20 | src1.code() * B16 | dst.code() * B12 |
1946 ((rotate >> 1) & 0xC) * B8 | 7 * B4 | src2.code()); 1946 ((rotate >> 1) & 0xC) * B8 | 7 * B4 | src2.code());
1947 } 1947 }
1948 1948
1949 1949
1950 void Assembler::rbit(Register dst, Register src, Condition cond) {
1951 // Instruction details available in ARM DDI 0406C.b, A8.8.144.
1952 // cond(31-28) | 011011111111(27-16) | Rd(15-12) | 11110011(11-4) | Rm(3-0)
1953 DCHECK(IsEnabled(ARMv7));
1954 DCHECK(!dst.is(pc));
1955 DCHECK(!src.is(pc));
1956 emit(cond | 0x6FF * B16 | dst.code() * B12 | 0xF3 * B4 | src.code());
1957 }
1958
1959
1950 // Status register access instructions. 1960 // Status register access instructions.
1951 void Assembler::mrs(Register dst, SRegister s, Condition cond) { 1961 void Assembler::mrs(Register dst, SRegister s, Condition cond) {
1952 DCHECK(!dst.is(pc)); 1962 DCHECK(!dst.is(pc));
1953 emit(cond | B24 | s | 15*B16 | dst.code()*B12); 1963 emit(cond | B24 | s | 15*B16 | dst.code()*B12);
1954 } 1964 }
1955 1965
1956 1966
1957 void Assembler::msr(SRegisterFieldMask fields, const Operand& src, 1967 void Assembler::msr(SRegisterFieldMask fields, const Operand& src,
1958 Condition cond) { 1968 Condition cond) {
1959 DCHECK(fields >= B16 && fields < B20); // at least one field set 1969 DCHECK(fields >= B16 && fields < B20); // at least one field set
(...skipping 2163 matching lines...) Expand 10 before | Expand all | Expand 10 after
4123 DCHECK(is_uint12(offset)); 4133 DCHECK(is_uint12(offset));
4124 instr_at_put(pc, SetLdrRegisterImmediateOffset(instr, offset)); 4134 instr_at_put(pc, SetLdrRegisterImmediateOffset(instr, offset));
4125 } 4135 }
4126 } 4136 }
4127 4137
4128 4138
4129 } // namespace internal 4139 } // namespace internal
4130 } // namespace v8 4140 } // namespace v8
4131 4141
4132 #endif // V8_TARGET_ARCH_ARM 4142 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/assembler-arm.h ('k') | src/arm/disasm-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698