Skip to content

Commit 355498f

Browse files
Rename A64 port to ARM64 port
BUG=354405 [email protected], [email protected] LOG=y Review URL: https://codereview.chromium.org/207823003 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@20148 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
1 parent 0c517e7 commit 355498f

File tree

101 files changed

+526
-530
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+526
-530
lines changed

Makefile

+4-4
Original file line numberDiff line numberDiff line change
@@ -223,11 +223,11 @@ endif
223223

224224
# Architectures and modes to be compiled. Consider these to be internal
225225
# variables, don't override them (use the targets instead).
226-
ARCHES = ia32 x64 arm a64 mipsel
226+
ARCHES = ia32 x64 arm arm64 mipsel
227227
DEFAULT_ARCHES = ia32 x64 arm
228228
MODES = release debug optdebug
229229
DEFAULT_MODES = release debug
230-
ANDROID_ARCHES = android_ia32 android_arm android_a64 android_mipsel
230+
ANDROID_ARCHES = android_ia32 android_arm android_arm64 android_mipsel
231231
NACL_ARCHES = nacl_ia32 nacl_x64
232232

233233
# List of files that trigger Makefile regeneration:
@@ -373,8 +373,8 @@ native.check: native
373373
--arch-and-mode=. $(TESTFLAGS)
374374

375375
SUPERFASTTESTMODES = ia32.release
376-
FASTTESTMODES = $(SUPERFASTTESTMODES),x64.release,ia32.optdebug,x64.optdebug,arm.optdebug,a64.release
377-
FASTCOMPILEMODES = $(FASTTESTMODES),a64.optdebug
376+
FASTTESTMODES = $(SUPERFASTTESTMODES),x64.release,ia32.optdebug,x64.optdebug,arm.optdebug,arm64.release
377+
FASTCOMPILEMODES = $(FASTTESTMODES),arm64.optdebug
378378

379379
COMMA = ,
380380
EMPTY =

Makefile.android

+3-3
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2727

2828
# Those definitions should be consistent with the main Makefile
29-
ANDROID_ARCHES = android_ia32 android_arm android_a64 android_mipsel
29+
ANDROID_ARCHES = android_ia32 android_arm android_arm64 android_mipsel
3030
MODES = release debug
3131

3232
# Generates all combinations of ANDROID ARCHES and MODES,
@@ -53,8 +53,8 @@ ifeq ($(ARCH), android_arm)
5353
TOOLCHAIN_PREFIX = $(TOOLCHAIN_ARCH)
5454
TOOLCHAIN_VER = 4.6
5555
else
56-
ifeq ($(ARCH), android_a64)
57-
DEFINES = target_arch=a64 v8_target_arch=a64 android_target_arch=arm64
56+
ifeq ($(ARCH), android_arm64)
57+
DEFINES = target_arch=arm64 v8_target_arch=arm64 android_target_arch=arm64
5858
TOOLCHAIN_ARCH = aarch64-linux-android
5959
TOOLCHAIN_PREFIX = $(TOOLCHAIN_ARCH)
6060
TOOLCHAIN_VER = 4.8

build/android.gypi

+2-2
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@
184184
'-L<(android_stlport_libs)/x86',
185185
],
186186
}],
187-
['target_arch=="a64"', {
187+
['target_arch=="arm64"', {
188188
'ldflags': [
189189
'-L<(android_stlport_libs)/arm64',
190190
],
@@ -214,7 +214,7 @@
214214
'target_conditions': [
215215
['_type=="executable"', {
216216
'conditions': [
217-
['target_arch=="a64"', {
217+
['target_arch=="arm64"', {
218218
'ldflags': [
219219
'-Wl,-dynamic-linker,/system/bin/linker64',
220220
],

build/standalone.gypi

+1-2
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
'<!(uname -m | sed -e "s/i.86/ia32/;\
5656
s/x86_64/x64/;\
5757
s/amd64/x64/;\
58-
s/aarch64/a64/;\
58+
s/aarch64/arm64/;\
5959
s/arm.*/arm/;\
6060
s/mips.*/mipsel/")',
6161
}, {
@@ -102,7 +102,6 @@
102102

103103
'conditions': [
104104
['(v8_target_arch=="arm" and host_arch!="arm") or \
105-
(v8_target_arch=="a64" and host_arch!="a64") or \
106105
(v8_target_arch=="arm64" and host_arch!="arm64") or \
107106
(v8_target_arch=="mipsel" and host_arch!="mipsel") or \
108107
(v8_target_arch=="x64" and host_arch!="x64") or \

build/toolchain.gypi

+3-4
Original file line numberDiff line numberDiff line change
@@ -268,9 +268,9 @@
268268
}], # _toolset=="target"
269269
],
270270
}], # v8_target_arch=="arm"
271-
['v8_target_arch=="a64" or v8_target_arch=="arm64"', {
271+
['v8_target_arch=="arm64"', {
272272
'defines': [
273-
'V8_TARGET_ARCH_A64',
273+
'V8_TARGET_ARCH_ARM64',
274274
],
275275
}],
276276
['v8_target_arch=="ia32"', {
@@ -413,8 +413,7 @@
413413
],
414414
}],
415415
['(OS=="linux" or OS=="android") and \
416-
(v8_target_arch=="x64" or v8_target_arch=="a64" or \
417-
v8_target_arch=="arm64")', {
416+
(v8_target_arch=="x64" or v8_target_arch=="arm64")', {
418417
# Check whether the host compiler and target compiler support the
419418
# '-m64' option and set it if so.
420419
'target_conditions': [

src/a64/OWNERS src/arm64/OWNERS

File renamed without changes.

src/a64/assembler-a64-inl.h src/arm64/assembler-arm64-inl.h

+7-7
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@
2525
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2626
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2727

28-
#ifndef V8_A64_ASSEMBLER_A64_INL_H_
29-
#define V8_A64_ASSEMBLER_A64_INL_H_
28+
#ifndef V8_ARM64_ASSEMBLER_ARM64_INL_H_
29+
#define V8_ARM64_ASSEMBLER_ARM64_INL_H_
3030

31-
#include "a64/assembler-a64.h"
31+
#include "arm64/assembler-arm64.h"
3232
#include "cpu.h"
3333
#include "debug.h"
3434

@@ -573,7 +573,7 @@ Address Assembler::target_address_at(Address pc, Code* code) {
573573
Address Assembler::target_address_from_return_address(Address pc) {
574574
// Returns the address of the call target from the return address that will
575575
// be returned to after a call.
576-
// Call sequence on A64 is:
576+
// Call sequence on ARM64 is:
577577
// ldr ip0, #... @ load from literal pool
578578
// blr ip0
579579
Address candidate = pc - 2 * kInstructionSize;
@@ -745,7 +745,7 @@ static const int kCodeAgeStubEntryOffset = 3 * kInstructionSize;
745745

746746

747747
Handle<Object> RelocInfo::code_age_stub_handle(Assembler* origin) {
748-
UNREACHABLE(); // This should never be reached on A64.
748+
UNREACHABLE(); // This should never be reached on ARM64.
749749
return Handle<Object>();
750750
}
751751

@@ -803,7 +803,7 @@ bool RelocInfo::IsPatchedReturnSequence() {
803803
// The sequence must be:
804804
// ldr ip0, [pc, #offset]
805805
// blr ip0
806-
// See a64/debug-a64.cc BreakLocationIterator::SetDebugBreakAtReturn().
806+
// See arm64/debug-arm64.cc BreakLocationIterator::SetDebugBreakAtReturn().
807807
Instruction* i1 = reinterpret_cast<Instruction*>(pc_);
808808
Instruction* i2 = i1->following();
809809
return i1->IsLdrLiteralX() && (i1->Rt() == ip0.code()) &&
@@ -1228,4 +1228,4 @@ void Assembler::ClearRecordedAstId() {
12281228

12291229
} } // namespace v8::internal
12301230

1231-
#endif // V8_A64_ASSEMBLER_A64_INL_H_
1231+
#endif // V8_ARM64_ASSEMBLER_ARM64_INL_H_

src/a64/assembler-a64.cc src/arm64/assembler-arm64.cc

+7-7
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@
2828

2929
#include "v8.h"
3030

31-
#if V8_TARGET_ARCH_A64
31+
#if V8_TARGET_ARCH_ARM64
3232

33-
#define A64_DEFINE_REG_STATICS
33+
#define ARM64_DEFINE_REG_STATICS
3434

35-
#include "a64/assembler-a64-inl.h"
35+
#include "arm64/assembler-arm64-inl.h"
3636

3737
namespace v8 {
3838
namespace internal {
@@ -155,7 +155,7 @@ const int RelocInfo::kApplyMask = 0;
155155

156156
bool RelocInfo::IsCodedSpecially() {
157157
// The deserializer needs to know whether a pointer is specially coded. Being
158-
// specially coded on A64 means that it is a movz/movk sequence. We don't
158+
// specially coded on ARM64 means that it is a movz/movk sequence. We don't
159159
// generate those for relocatable pointers.
160160
return false;
161161
}
@@ -1944,7 +1944,7 @@ void Assembler::debug(const char* message, uint32_t code, Instr params) {
19441944
Label start;
19451945
bind(&start);
19461946

1947-
// Refer to instructions-a64.h for a description of the marker and its
1947+
// Refer to instructions-arm64.h for a description of the marker and its
19481948
// arguments.
19491949
hlt(kImmExceptionIsDebug);
19501950
ASSERT(SizeOfCodeGeneratedSince(&start) == kDebugCodeOffset);
@@ -2594,7 +2594,7 @@ void Assembler::CheckConstPool(bool force_emit, bool require_jump) {
25942594
// 1) Encode the size of the constant pool, for use by the disassembler.
25952595
// 2) Terminate the program, to try to prevent execution from accidentally
25962596
// flowing into the constant pool.
2597-
// The header is therefore made of two a64 instructions:
2597+
// The header is therefore made of two arm64 instructions:
25982598
// ldr xzr, #<size of the constant pool in 32-bit words>
25992599
// blr xzr
26002600
// If executed the code will likely segfault and lr will point to the
@@ -2810,4 +2810,4 @@ void Assembler::PopulateConstantPool(ConstantPoolArray* constant_pool) {
28102810

28112811
} } // namespace v8::internal
28122812

2813-
#endif // V8_TARGET_ARCH_A64
2813+
#endif // V8_TARGET_ARCH_ARM64

src/a64/assembler-a64.h src/arm64/assembler-arm64.h

+8-8
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2626
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2727

28-
#ifndef V8_A64_ASSEMBLER_A64_H_
29-
#define V8_A64_ASSEMBLER_A64_H_
28+
#ifndef V8_ARM64_ASSEMBLER_ARM64_H_
29+
#define V8_ARM64_ASSEMBLER_ARM64_H_
3030

3131
#include <list>
3232
#include <map>
@@ -35,8 +35,8 @@
3535
#include "utils.h"
3636
#include "assembler.h"
3737
#include "serialize.h"
38-
#include "a64/instructions-a64.h"
39-
#include "a64/cpu-a64.h"
38+
#include "arm64/instructions-arm64.h"
39+
#include "arm64/cpu-arm64.h"
4040

4141

4242
namespace v8 {
@@ -332,7 +332,7 @@ STATIC_ASSERT(sizeof(CPURegister) == sizeof(Register));
332332
STATIC_ASSERT(sizeof(CPURegister) == sizeof(FPRegister));
333333

334334

335-
#if defined(A64_DEFINE_REG_STATICS)
335+
#if defined(ARM64_DEFINE_REG_STATICS)
336336
#define INITIALIZE_REGISTER(register_class, name, code, size, type) \
337337
const CPURegister init_##register_class##_##name = {code, size, type}; \
338338
const register_class& name = *reinterpret_cast<const register_class*>( \
@@ -345,7 +345,7 @@ STATIC_ASSERT(sizeof(CPURegister) == sizeof(FPRegister));
345345
extern const register_class& name
346346
#define ALIAS_REGISTER(register_class, alias, name) \
347347
extern const register_class& alias
348-
#endif // defined(A64_DEFINE_REG_STATICS)
348+
#endif // defined(ARM64_DEFINE_REG_STATICS)
349349

350350
// No*Reg is used to indicate an unused argument, or an error case. Note that
351351
// these all compare equal (using the Is() method). The Register and FPRegister
@@ -1663,7 +1663,7 @@ class Assembler : public AssemblerBase {
16631663

16641664
// Pseudo-instructions ------------------------------------------------------
16651665

1666-
// Parameters are described in a64/instructions-a64.h.
1666+
// Parameters are described in arm64/instructions-arm64.h.
16671667
void debug(const char* message, uint32_t code, Instr params = BREAK);
16681668

16691669
// Required by V8.
@@ -2220,4 +2220,4 @@ class EnsureSpace BASE_EMBEDDED {
22202220

22212221
} } // namespace v8::internal
22222222

2223-
#endif // V8_A64_ASSEMBLER_A64_H_
2223+
#endif // V8_ARM64_ASSEMBLER_ARM64_H_

src/a64/builtins-a64.cc src/arm64/builtins-arm64.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
#include "v8.h"
2929

30-
#if V8_TARGET_ARCH_A64
30+
#if V8_TARGET_ARCH_ARM64
3131

3232
#include "codegen.h"
3333
#include "debug.h"

src/a64/code-stubs-a64.cc src/arm64/code-stubs-arm64.cc

+7-7
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
#include "v8.h"
2929

30-
#if V8_TARGET_ARCH_A64
30+
#if V8_TARGET_ARCH_ARM64
3131

3232
#include "bootstrapper.h"
3333
#include "code-stubs.h"
@@ -1237,7 +1237,7 @@ void MathPowStub::Generate(MacroAssembler* masm) {
12371237
__ Fadd(base_double, base_double, fp_zero);
12381238
// The operation -0+0 results in +0 in all cases except where the
12391239
// FPCR rounding mode is 'round towards minus infinity' (RM). The
1240-
// A64 simulator does not currently simulate FPCR (where the rounding
1240+
// ARM64 simulator does not currently simulate FPCR (where the rounding
12411241
// mode is set), so test the operation with some debug code.
12421242
if (masm->emit_debug_code()) {
12431243
UseScratchRegisterScope temps(masm);
@@ -1259,7 +1259,7 @@ void MathPowStub::Generate(MacroAssembler* masm) {
12591259

12601260
// If base is -INFINITY, make it +INFINITY.
12611261
// * Calculate base - base: All infinities will become NaNs since both
1262-
// -INFINITY+INFINITY and +INFINITY-INFINITY are NaN in A64.
1262+
// -INFINITY+INFINITY and +INFINITY-INFINITY are NaN in ARM64.
12631263
// * If the result is NaN, calculate abs(base).
12641264
__ Fsub(scratch0_double, base_double, base_double);
12651265
__ Fcmp(scratch0_double, 0.0);
@@ -1399,7 +1399,7 @@ void CodeStub::GenerateStubsAheadOfTime(Isolate* isolate) {
13991399

14001400

14011401
void CodeStub::GenerateFPStubs(Isolate* isolate) {
1402-
// Floating-point code doesn't get special handling in A64, so there's
1402+
// Floating-point code doesn't get special handling in ARM64, so there's
14031403
// nothing to do here.
14041404
USE(isolate);
14051405
}
@@ -4635,7 +4635,7 @@ void BinaryOpICWithAllocationSiteStub::Generate(MacroAssembler* masm) {
46354635

46364636

46374637
bool CodeStub::CanUseFPRegisters() {
4638-
// FP registers always available on A64.
4638+
// FP registers always available on ARM64.
46394639
return true;
46404640
}
46414641

@@ -4933,7 +4933,7 @@ void ProfileEntryHookStub::Generate(MacroAssembler* masm) {
49334933
// Compute the function's address as the first argument.
49344934
__ Sub(x0, lr, kReturnAddressDistanceFromFunctionStart);
49354935

4936-
#if V8_HOST_ARCH_A64
4936+
#if V8_HOST_ARCH_ARM64
49374937
uintptr_t entry_hook =
49384938
reinterpret_cast<uintptr_t>(masm->isolate()->function_entry_hook());
49394939
__ Mov(x10, entry_hook);
@@ -5726,4 +5726,4 @@ void CallApiGetterStub::Generate(MacroAssembler* masm) {
57265726

57275727
} } // namespace v8::internal
57285728

5729-
#endif // V8_TARGET_ARCH_A64
5729+
#endif // V8_TARGET_ARCH_ARM64

src/a64/code-stubs-a64.h src/arm64/code-stubs-arm64.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2626
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2727

28-
#ifndef V8_A64_CODE_STUBS_A64_H_
29-
#define V8_A64_CODE_STUBS_A64_H_
28+
#ifndef V8_ARM64_CODE_STUBS_ARM64_H_
29+
#define V8_ARM64_CODE_STUBS_ARM64_H_
3030

3131
#include "ic-inl.h"
3232

@@ -466,4 +466,4 @@ struct PlatformCallInterfaceDescriptor {
466466

467467
} } // namespace v8::internal
468468

469-
#endif // V8_A64_CODE_STUBS_A64_H_
469+
#endif // V8_ARM64_CODE_STUBS_ARM64_H_

src/a64/codegen-a64.cc src/arm64/codegen-arm64.cc

+7-7
Original file line numberDiff line numberDiff line change
@@ -27,26 +27,26 @@
2727

2828
#include "v8.h"
2929

30-
#if V8_TARGET_ARCH_A64
30+
#if V8_TARGET_ARCH_ARM64
3131

3232
#include "codegen.h"
3333
#include "macro-assembler.h"
34-
#include "simulator-a64.h"
34+
#include "simulator-arm64.h"
3535

3636
namespace v8 {
3737
namespace internal {
3838

3939
#define __ ACCESS_MASM(masm)
4040

4141
#if defined(USE_SIMULATOR)
42-
byte* fast_exp_a64_machine_code = NULL;
42+
byte* fast_exp_arm64_machine_code = NULL;
4343
double fast_exp_simulator(double x) {
4444
Simulator * simulator = Simulator::current(Isolate::Current());
4545
Simulator::CallArgument args[] = {
4646
Simulator::CallArgument(x),
4747
Simulator::CallArgument::End()
4848
};
49-
return simulator->CallDouble(fast_exp_a64_machine_code, args);
49+
return simulator->CallDouble(fast_exp_arm64_machine_code, args);
5050
}
5151
#endif
5252

@@ -92,7 +92,7 @@ UnaryMathFunction CreateExpFunction() {
9292
#if !defined(USE_SIMULATOR)
9393
return FUNCTION_CAST<UnaryMathFunction>(buffer);
9494
#else
95-
fast_exp_a64_machine_code = buffer;
95+
fast_exp_arm64_machine_code = buffer;
9696
return &fast_exp_simulator;
9797
#endif
9898
}
@@ -546,7 +546,7 @@ void MathExpGenerator::EmitMathExp(MacroAssembler* masm,
546546
// Continue the common case first. 'mi' tests N == 1.
547547
__ B(&result_is_finite_non_zero, mi);
548548

549-
// TODO(jbramley): Consider adding a +infinity register for A64.
549+
// TODO(jbramley): Consider adding a +infinity register for ARM64.
550550
__ Ldr(double_temp2, ExpConstant(constants, 2)); // Synthesize +infinity.
551551

552552
// Select between +0.0 and +infinity. 'lo' tests C == 0.
@@ -612,4 +612,4 @@ void MathExpGenerator::EmitMathExp(MacroAssembler* masm,
612612

613613
} } // namespace v8::internal
614614

615-
#endif // V8_TARGET_ARCH_A64
615+
#endif // V8_TARGET_ARCH_ARM64

0 commit comments

Comments
 (0)